[SERVER-12047] geoNear cmd + uniquedocs = fuzzier results Created: 11/Dec/13  Updated: 11/Jul/16  Resolved: 24/Feb/14

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: None
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Minor - P4
Reporter: hari.khalsa@10gen.com Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
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);

Participants:

 Comments   
Comment by hari.khalsa@10gen.com [ 24/Feb/14 ]

We fixed this by removing the uniqueDocs option and setting it to 'true' always internally.

Generated at Thu Feb 08 03:27:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.