Details
-
Bug
-
Resolution: Done
-
Minor - P4
-
None
-
Fully Compatible
-
ALL
-
Query 2019-12-02
Description
The indexKey meta projection does not seem to be filling in fields, even when an index seems to be being used.
> db.test.ensureIndex({a:1})
|
> db.test.insert({a:1})
|
> db.test.find({a:1}, {b: {$meta: "indexKey"}})
|
{ }
|
> db.test.find({a:1}, {b: {$meta: "indexKey"}}).explain()
|
{
|
"cursor" : "BtreeCursor a_1",
|
"isMultiKey" : false,
|
"n" : 1,
|
"nscannedObjects" : 0,
|
"nscanned" : 1,
|
"nscannedObjectsAllPlans" : 0,
|
"nscannedAllPlans" : 1,
|
"scanAndOrder" : false,
|
"indexOnly" : true,
|
"nYields" : 0,
|
"nChunkSkips" : 0,
|
"millis" : 0,
|
"indexBounds" : {
|
"a" : [
|
[
|
1,
|
1
|
]
|
]
|
},
|
"server" : "Andrew-Emil-MacBook-Pro.local:27017"
|
}
|
Attachments
Issue Links
- is duplicated by
-
SERVER-43168 Ensure "indexKey" option to $meta works correctly
-
- Closed
-
- is related to
-
SERVER-17929 Add full query support for $meta values geoNearDistance/geoNearPoint
-
- Backlog
-