the issue comes after an index is created
-----------------------------------------------------------------------
from pymongo.connection import Connection
from pymongo import ASCENDING
connection = Connection()
db = connection["test"]
db.drop_collection("foo")
collection = db.foo
doc =
#collection.ensure_index([("name",ASCENDING)])
collection.insert(doc)
cursor = collection.find()
for d in cursor:
print d
c = collection.find({"name":{"$all":["harry","john"]}}).count()
- should be 0 :1 instead --> fails if index created (only the first item in list seems to be taken)
print "0/"+str(c)