|
Fixed in the new query system written for 2.6:
> db.version()
|
2.6.7
|
> c = db.c
|
test.c
|
> c.drop()
|
false
|
> c.insert({a: 1})
|
WriteResult({ "nInserted" : 1 })
|
> c.insert({a: 2})
|
WriteResult({ "nInserted" : 1 })
|
> c.insert({a: 3})
|
WriteResult({ "nInserted" : 1 })
|
> c.ensureIndex({a: 1})
|
{
|
"createdCollectionAutomatically" : false,
|
"numIndexesBefore" : 1,
|
"numIndexesAfter" : 2,
|
"ok" : 1
|
}
|
> c.find().hint({a: 1}).batchSize(2)._addSpecial("$returnKey", true)
|
{ "a" : 1 }
|
{ "a" : 2 }
|
{ "a" : 3 }
|
Closing as a duplicate of SERVER-10026.
|