-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
ALL
Tried the following:
db = db.getSiblingDB('qa'); db.foo.save({b:[1, 2, 3, 4]}); db.foo.find({}, {"b.2":1});
Result is an empty array:
{ "_id" : ObjectId("4f5f95b285228a256ddccf7e"), "b" : [ ] }
Is that supposed to work, or are we just not detecting the unsupported syntax?
Since it has to be quoted anyway, it would be nicer if this worked:
> db.foo.find({}, {"b[2]":1}); { "_id" : ObjectId("4f5f95b285228a256ddccf7e") }
- duplicates
-
SERVER-1831 Using dot-notation to field-select an element by position from a nested Array fails to return the element
- Backlog
- is related to
-
SERVER-4589 aggregation: need an array indexing operator
- Closed