[SERVER-31651] geoNear command and $geoNear agg stage should accept a "key" field Created: 19/Oct/17 Updated: 30/Oct/23 Resolved: 01/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework, Geo, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Query 2017-11-13, Query 2017-12-04, Query 2017-12-18 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
The geoNear command and the $geoNear agg stage currently infer the field path over which to perform the search based on the presence of a "2d" or "2dsphere" index: The command will fail if there are multiple geo indexes. In order to improve this behavior, we should extend the command and agg stage to accept an optional key field. This field must be a string, and will be interpreted as the field path over which to run the search. In order to avoid breaking existing applications, the existing behavior should be preserved when the key field is omitted. |
| Comments |
| Comment by Githook User [ 01/Dec/17 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@10gen.com'}Message: |
| Comment by Githook User [ 01/Dec/17 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@10gen.com'}Message: |
| Comment by Githook User [ 01/Dec/17 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@10gen.com'}Message: |
| Comment by Andy Schwerin [ 21/Oct/17 ] |
|
LGTM |
| Comment by Charlie Swanson [ 19/Oct/17 ] |
|
"LGTM" |
| Comment by David Storch [ 19/Oct/17 ] |
|
charlie.swanson schwerin ian.whalen, this is a pretty small improvement, so I don't think it warrants a formal review. Do you agree? If so, could you please just provide your "LGTM" here for the proposed syntax/behavior change? |