-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Geo, Querying
-
None
-
Fully Compatible
-
Query 2017-11-13, Query 2017-12-04, Query 2017-12-18
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.
- is duplicated by
-
SERVER-28976 Allow $geoNear on collections with more than one 2dsphere/2d index
- Closed