Clarify some docs about geo-distance sorting. (#20735)

This also improves formatting a bit.
This commit is contained in:
Adrien Grand 2016-10-07 15:26:34 +02:00 committed by GitHub
parent c1e5421b77
commit 7a403f640b
1 changed files with 14 additions and 2 deletions

View File

@ -243,8 +243,20 @@ GET /_search
How to compute the distance. Can either be `sloppy_arc` (default), `arc` (slightly more precise but significantly slower) or `plane` (faster, but inaccurate on long distances and close to the poles). How to compute the distance. Can either be `sloppy_arc` (default), `arc` (slightly more precise but significantly slower) or `plane` (faster, but inaccurate on long distances and close to the poles).
Note: the geo distance sorting supports `sort_mode` options: `min`, `sort_mode`::
`max` and `avg`.
What to do in case a field has several geo points. By default, the shortest
distance is taken into account when sorting in ascending order and the
longest distance when sorting in descending order. Supported values are
`min`, `max`, `median` and `avg`.
`unit`::
The unit to use when computing sort values. The default is `m` (meters).
NOTE: geo distance sorting does not support configurable missing values: the
distance will always be considered equal to +Infinity+ when a document does not
have values for the field that is used for distance computation.
The following formats are supported in providing the coordinates: The following formats are supported in providing the coordinates: