-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
This is definitely an edge case, but probably should work (referenced here: http://groups.google.com/group/mongodb-user/browse_thread/thread/32511a51caad9085). Here's how to reproduce:
> db.a.save({a: {spec: [{ info: [
{key: "author", value: "poe"}]} ]}})
> db.a.find()
{ "_id" : ObjectId("4e5d23ba339dc0b7074165f6"), "a" : { "spec" : [ { "info" : [
] } ] } }
> db.a.find(
{"a.spec.0.info.0.key": "author", "a.spec.0.info.0.value": "poe"})
{ "_id" : ObjectId("4e5d23ba339dc0b7074165f6"), "a" : { "spec" : [ { "info" : [
] } ] } }
So far so good. Now add an index:
> db.a.ensureIndex(
)
> db.a.find(
{"a.spec.0.info.0.key": "author", "a.spec.0.info.0.value": "poe"})
Returns nothing!
- duplicates
-
SERVER-2902 Index keys are not generated for numerically referenced array elements
- Closed