You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current geo support does not work well when a document as multiple locations. For this reason, the structure of how geo information is indexed requires changing.
Note, sadly, this requires both reindexing of the data if geo features are used, and requires to predefine the geo_point type for geo location objects (where before, just an object with lat and lon fields were enough).
The geo_point has been changed. Now, a string representation (lat,lon) is always stored under the object name, for example:
Will cause a field called location with the "40.12,-71.34" value to be stored. lat/lon are not stored by default now, since they are not needed, geohash can still be enabled as well.
The new options for geo_point are:
lat_lon: Set to true to also index a lat and lon fields.
geohash: Set to true to also index a geohash (under pin.location.geohash in our example).
geo_precision: The geohash precision. Defaults to 12.
When loading a geo point in a script using the doc[...] notion, a value (for example: doc['location'].value) returns a GeoPoint, which allows to access lat, lon, and geohash within the script (much simpler to be used in scripts compared to previously).
The text was updated successfully, but these errors were encountered:
The current geo support does not work well when a document as multiple locations. For this reason, the structure of how geo information is indexed requires changing.
Note, sadly, this requires both reindexing of the data if geo features are used, and requires to predefine the
geo_point
type for geo location objects (where before, just an object withlat
andlon
fields were enough).The
geo_point
has been changed. Now, a string representation (lat,lon) is always stored under the object name, for example:Will cause a field called
location
with the "40.12,-71.34" value to be stored. lat/lon are not stored by default now, since they are not needed, geohash can still be enabled as well.The new options for
geo_point
are:lat_lon
: Set totrue
to also index alat
andlon
fields.geohash
: Set totrue
to also index ageohash
(underpin.location.geohash
in our example).geo_precision
: The geohash precision. Defaults to12
.When loading a geo point in a script using the
doc[...]
notion, a value (for example:doc['location'].value
) returns aGeoPoint
, which allows to accesslat
,lon
, andgeohash
within the script (much simpler to be used in scripts compared to previously).The text was updated successfully, but these errors were encountered: