[SERVER-2135] distinct() broken for indexed geo fields Created: 22/Nov/10 Updated: 12/Jul/16 Resolved: 06/Apr/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo, Index Maintenance |
| Affects Version/s: | 1.7.3 |
| Fix Version/s: | 1.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brandon Heller | Assignee: | Greg Studer |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS X 64-bit, 1.7.3 prebuilt |
||
| Attachments: |
|
| Operating System: | ALL |
| Participants: |
| Description |
|
w/1.7.3, distinct() doesn't seem to work with an indexed geo field, though in it does in 1.6.4. To replicate, run these 3 lines in mongo: use test_distinct ) ) OK, we see one commit. But if the geo field is indexed, we get an exception. > db.commits.ensureIndex( {'loc': '2d'}) , , ) choices: { $natural: 1 } ", In 1.6.4, this works (same inputs as above) > db.runCommand( {distinct: 'commits', key: 'loc'}) { "values" : [ 13.00156, 55.59664 ], "ok" : 1 } |
| Comments |
| Comment by auto [ 06/Apr/11 ] |
|
Author: {u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}Message: skip indices which require sorting for distinct |
| Comment by Greg Studer [ 06/Apr/11 ] |
|
Test case to reproduce. |