U moet de distinct . maken roep op de cursor terug van een find in plaats van op de collectie:
tags = db.mycoll.find({"category": "movie"}).distinct("tags")
U moet de distinct . maken roep op de cursor terug van een find in plaats van op de collectie:
tags = db.mycoll.find({"category": "movie"}).distinct("tags")