Docs: Document distance type and sort mode for many to many geo_points
closes #7280
This commit is contained in:
parent
9addac8300
commit
639692943f
|
@ -148,9 +148,7 @@ The following are options allowed on the filter:
|
||||||
|
|
||||||
`distance_type`::
|
`distance_type`::
|
||||||
|
|
||||||
How to compute the distance. Can either be `arc` (better precision),
|
How to compute the distance. Can either be `sloppy_arc` (default), `arc` (slighly more precise but significantly slower) or `plane` (faster, but inaccurate on long distances and close to the poles).
|
||||||
`sloppy_arc` (faster but less precise) or `plane` (fastest). Defaults
|
|
||||||
to `sloppy_arc`.
|
|
||||||
|
|
||||||
`optimize_bbox`::
|
`optimize_bbox`::
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,9 @@ Allow to sort by `_geo_distance`. Here is an example:
|
||||||
"_geo_distance" : {
|
"_geo_distance" : {
|
||||||
"pin.location" : [-70, 40],
|
"pin.location" : [-70, 40],
|
||||||
"order" : "asc",
|
"order" : "asc",
|
||||||
"unit" : "km"
|
"unit" : "km",
|
||||||
|
"mode" : "min",
|
||||||
|
"distance_type" : "sloppy_arc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -181,6 +183,12 @@ Allow to sort by `_geo_distance`. Here is an example:
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
`distance_type`::
|
||||||
|
|
||||||
|
How to compute the distance. Can either be `sloppy_arc` (default), `arc` (slighly 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`,
|
Note: the geo distance sorting supports `sort_mode` options: `min`,
|
||||||
`max` and `avg`.
|
`max` and `avg`.
|
||||||
|
|
||||||
|
@ -289,7 +297,7 @@ Multiple geo points can be passed as an array containing any `geo_point` format,
|
||||||
|
|
||||||
and so forth.
|
and so forth.
|
||||||
|
|
||||||
The final distance for a document will then be `min`/`max` distance of all points contained in the document to all points given in the sort request.
|
The final distance for a document will then be `min`/`max`/`avg` (defined via `mode`) distance of all points contained in the document to all points given in the sort request.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue