Info
[SERVER-12047] geoNear cmd + uniquedocs = fuzzier results
Top User Comments
hari.khalsa@10gen.com commented on Mon, 24 Feb 2014 15:44:05 +0000:
We fixed this by removing the uniqueDocs option and setting it to 'true' always internally.
Steps to Reproduce
collName = 'geo_uniqueDocs_test'
t = db.geo_uniqueDocs_test
t.drop()
t.save(
{ locs : [ [0,2], [3,4]] }
)
t.save(
{ locs : [ [6,8], [10,10] ] }
)
t.ensureIndex(
{ locs : '2d' }
)
results = db.runCommand(
{geoNear:collName, near:[0,0], num:2, uniqueDocs:false}
).results
printjson(results);
results = db.runCommand(
{geoNear:collName, near:[0,0], num:2, uniqueDocs:true}
).results
printjson(results);