[SERVER-382] Similar issue - reproduced Created: 22/Oct/09  Updated: 02/Aug/18  Resolved: 22/Oct/09

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.1.2
Fix Version/s: 1.1.3

Type: Task Priority: Major - P3
Reporter: christophe Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux Ubuntu, Windows


Participants:

 Description   

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 =

{"name":["harry","jack","tom"]}

#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()

  1. should be 0 :1 instead --> fails if index created (only the first item in list seems to be taken)
    print "0/"+str(c)


 Comments   
Comment by Eliot Horowitz (Inactive) [ 22/Oct/09 ]

thanks! found and fixed.
more tests in jstests/all2.js

Generated at Thu Feb 08 02:53:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.