Docs: Document distance type and sort mode for many to many geo_points

closes #7280
This commit is contained in:
Britta Weber 2014-08-14 14:54:34 +02:00
parent 9addac8300
commit 639692943f
2 changed files with 11 additions and 5 deletions

View File

@ -148,9 +148,7 @@ The following are options allowed on the filter:
`distance_type`::
How to compute the distance. Can either be `arc` (better precision),
`sloppy_arc` (faster but less precise) or `plane` (fastest). Defaults
to `sloppy_arc`.
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).
`optimize_bbox`::

View File

@ -171,7 +171,9 @@ Allow to sort by `_geo_distance`. Here is an example:
"_geo_distance" : {
"pin.location" : [-70, 40],
"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`,
`max` and `avg`.
@ -289,7 +297,7 @@ Multiple geo points can be passed as an array containing any `geo_point` format,
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.