which returns no document while there is a document that matches the query.
The same document is returned if I do:
db.tasks.find({author:ObjectId("52120773bfb5ccce7500000a")})
or
db.tasks.find({name: 'test-trash-3', author:ObjectId("52120773bfb5ccce7500000a")})
but if I try to combine both criterias it is empty, most objects in the collection dont' have this issue, they're all created using mongoose.js, but only a small minority have the issue.
Mongo version is 2.4.9 mongoose is the latest one.
Any suggestion on how to proceed with troubleshooting (or pointer to a known bug) would be awesome :)
Did
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/cc9808ee-4f84-41cc-858b-5d9edcbd749b%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/xHxvSCC0LPc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
> db.tasks.find({name:"newFieldNoticePas"}, {author:1})
{ "_id" : ObjectId("5461320d4e84ee3c48f28ee7"), "author" : ObjectId("524ad49e2718e1645a000106") }
> db.tasks.find({name:"newFieldNoticePas", "author" : ObjectId("524ad49e2718e1645a000106")}, {author:1})
>
obviously the second query should return the same object.
So I looked at the indexes as you suggested, and there were a few I don't use anymore, which I deleted and this fixed the issue!
> db.tasks.find({name:"newFieldNoticePas", "author" : ObjectId("524ad49e2718e1645a000106")}, {author:1})
{ "_id" : ObjectId("5461320d4e84ee3c48f28ee7"), "author" : ObjectId("524ad49e2718e1645a000106") }
These are the indexes I deleted:
> db.tasks.dropIndex('views_1')
> db.tasks.dropIndex('uses_1')
> db.tasks.dropIndex('description_1')
> db.tasks.dropIndex('entitlements_1')
> db.tasks.dropIndex('author_1_name_1_description_1_labels_1_updated_at_-1')
> db.tasks.dropIndex('author_1_entitlements_1_name_1_description_1_uses_-1')
> db.tasks.dropIndex('author_1_entitlements_1_name_1_description_1_updated_at_-1')
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/2afef9c7-ecf6-46d7-9453-3b400b204324%40googlegroups.com.