浏览代码

Add distance supported units

David Pilato 12 年之前
父节点
当前提交
1e3ffa0df7

+ 3 - 3
docs/reference/query-dsl/filters/geo-distance-filter.asciidoc

@@ -142,9 +142,9 @@ The following are options allowed on the filter:
 |=======================================================================
 |Option |Description
 |`distance` |The distance to include hits in the filter. The distance
-can be a numeric value, and then the `unit` (either `mi`/@miles@ or `km`
-can be set) controlling the unit. Or a single string with the unit as
-well.
+can be a numeric value, and then the `unit` (either `mi`, `miles`, `in`, `inch`, `yd`, `yards`, `km`, `kilometers`,
+`mm`, `millimeters`, `cm`, `centimeters`, `m` or `meters` can be set) controlling the unit.
+Or a single string with the unit as well.
 
 |`distance_type` |How to compute the distance. Can either be `arc`
 (better precision) or `plane` (faster). Defaults to `arc`.

+ 2 - 2
docs/reference/search/facets/geo-distance-facet.asciidoc

@@ -169,7 +169,7 @@ itself.
 |=======================================================================
 |Option |Description
 |`unit` |The unit the ranges are provided in. Defaults to `km`. Can also
-be `mi` or `miles`.
+be `mi`, `miles`, `in`, `inch`, `yd`, `yards`, `kilometers`, `mm`, `millimeters`, `cm`, `centimeters`, `m` or `meters`.
 
 |`distance_type` |How to compute the distance. Can either be `arc`
 (better precision) or `plane` (faster). Defaults to `arc`.
@@ -249,4 +249,4 @@ field.
 [NOTE]
 --
 The facet can work with multiple locations per document.
---
+--