[SERVER-9599] geoNear uniqueDocs not working as documented Created: 06/May/13 Updated: 15/Nov/21 Resolved: 02/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.3.2, 2.4.0, 2.4.1, 2.4.2, 2.4.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ygor Lemos | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | commands, geoNear, uniqueDocs | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MongoHQ Large running MongoDB 2.4.3 |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | 1- Run the geoNear command against a collection with documents having multiple locations. The geoNear command should NOT have the uniqueDocs parameter specified. |
||||||||
| Participants: | |||||||||
| Description |
|
when I run the geoNear command with the near parameter without specifying uniqueDocs, it should only return one document per matched location (assuming my documents have multiple locations indexed). Instead, even not specifying uniqueDocs, it is returning the documents multiple times (as locations are matched by geoNear). This should only happen if I had explicitly specified uniqueDocs: false which I haven't. See uniqueDocs ref: http://docs.mongodb.org/manual/reference/command/geoNear/ Here is my query (using pymongo):
my indexes for this particular collection (referring to the geo stuff are): { key: { "locations.location": "2d" }, v: 1, ns: "cashme.missions", name: "locations.location_2d" } so either the default for uniqueDocs was documented erratically on MongoDB oficial docs or there is a problem with uniqueDocs for geoNear (or am I missing something?). |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 02/Mar/14 ] |
|
i believe this is a duplicate of |