I am using pymongo and want to have distinct values for a field such that I can also pass other query parameters. For example, I have entries like:
{ id = \"m
You have to make the distinct call on the cursor returned from a find instead of on the collection:
distinct
find
tags = db.mycoll.find({"category": "movie"}).distinct("tags")