-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo Overhaul (work with multiple locations) #414
Labels
Comments
Geo Overhaul (work with multiple locations), closed by 6314c24. |
medcl
pushed a commit
to medcl/elasticsearch
that referenced
this issue
Jul 1, 2011
medcl
pushed a commit
to medcl/elasticsearch
that referenced
this issue
Jul 1, 2011
…ge (again) how geo location is stored, not using geohash but explicit double conversion
ClaudioMFreitas
pushed a commit
to ClaudioMFreitas/elasticsearch-1
that referenced
this issue
Nov 12, 2019
Make 6.x the default version
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: