[#249,docs][s]: document geo_point type throughly.
This commit is contained in:
@@ -118,20 +118,43 @@ The type list is as follows (brackets indicate
|
|||||||
possible aliases for specific types - these types will be recognized and
|
possible aliases for specific types - these types will be recognized and
|
||||||
normalized to the default type name for that type):
|
normalized to the default type name for that type):
|
||||||
|
|
||||||
* string (text) - a string
|
* **string (text)**: a string
|
||||||
* number (double, float, numeric) - a number including floating point numbers.
|
* **number (double, float, numeric)**: a number including floating point numbers.
|
||||||
* integer (int) - an integer.
|
* **integer (int)**: an integer.
|
||||||
* date - a date. The preferred format is YYYY-MM-DD.
|
* **date**: a date. The preferred format is YYYY-MM-DD.
|
||||||
* time - a time without a date
|
* **time**: a time without a date
|
||||||
* date-time (datetime, timestamp) a date-time. It is recommended this be in ISO 8601
|
* **date-time (datetime, timestamp)**: a date-time. It is recommended this be in ISO 8601
|
||||||
format of YYYY-MM- DDThh:mm:ssZ in UTC time.
|
format of YYYY-MM- DDThh:mm:ssZ in UTC time.
|
||||||
* boolean (bool)
|
* **boolean (bool)**
|
||||||
* binary - base64 representation of binary data.
|
* **binary**: base64 representation of binary data.
|
||||||
* geo_point
|
* **geo_point**: as per
|
||||||
* geojson
|
<http://www.elasticsearch.org/guide/reference/mapping/geo-point-type.html>.
|
||||||
* array
|
That is a field (in these examples named location) that has one of the
|
||||||
* object (json)
|
following structures:
|
||||||
* any - value of field may be any type
|
|
||||||
|
location: {
|
||||||
|
lon: ...
|
||||||
|
lat: ...
|
||||||
|
}
|
||||||
|
|
||||||
|
location: [lon,lat]
|
||||||
|
|
||||||
|
location: "lat, lng"
|
||||||
|
|
||||||
|
As bonus there is also support for (beyond the ES style geo_point):
|
||||||
|
|
||||||
|
// geonames style
|
||||||
|
location: {
|
||||||
|
lng: ...
|
||||||
|
lat: ...
|
||||||
|
}
|
||||||
|
// found on the web
|
||||||
|
location: "(lat, lon)"
|
||||||
|
|
||||||
|
* **geojson**: as per <http://geojson.org/>
|
||||||
|
* **array**: an array
|
||||||
|
* **object (json)**: an object
|
||||||
|
* **any**: value of field may be any type
|
||||||
|
|
||||||
<div class="alert">NB: types are not validated so you can set the type to
|
<div class="alert">NB: types are not validated so you can set the type to
|
||||||
whatever value you like (it does not have to be in the above list). However,
|
whatever value you like (it does not have to be in the above list). However,
|
||||||
|
|||||||
Reference in New Issue
Block a user