[SERVER-1509] doing a geo $near search with other fields in the query makes it so the results can't be sorted Created: 29/Jul/10 Updated: 26/Sep/17 Resolved: 15/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo, Querying |
| Affects Version/s: | 1.4.4, 1.5.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jay Marcyes | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
os: Windows 7 |
||
| Participants: |
| Description |
|
creating an index like this: db.places.ensureIndex( { loc : "2d", foo: 1 }) then querying on the index like this fails return the expected result: db.places.find({loc: {$near: [37.775,-122.4183333]},foo: {$gte: 100}}).sort( {foo:1}); if you take out the second part of the query (the foo: {$gte: 100}) but leave in the sort then it returns the expected result. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 15/Nov/10 ] |
|
1.6.4 |
| Comment by Eliot Horowitz (Inactive) [ 15/Nov/10 ] |
|
This is working for me in 1.6 as well. |
| Comment by Sasank Reddy [ 15/Nov/10 ] |
|
Would it be possible to get this back-ported to 1.6.X? |
| Comment by auto [ 15/Nov/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: test for |
| Comment by Eliot Horowitz (Inactive) [ 15/Nov/10 ] |
|
See attached test. |