-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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: Filter by distance based on location #279
Comments
implemented. |
In examples, missing |
What goes before this json request ? I tried this 'geo_distance' filter query about 20 times but it gives me this error. My Code :
The error produced is {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [filtered].","line":1,"col":19}],"type":"parsing_exception","reason":"Unknown key for a START_OBJECT in [filtered].","line":1,"col":19},"status":400} Kindly help me. |
Ask questions on discuss.elastic.co Filtered query has been removed in 5.0. See breaking changes in doc |
Disable the Netty recycler
Since elastic#264 night-rally requires runtime JDK to be specified as cmd param. Relates to elastic/night-rally#264
The ability to define a query DSL filter, allowing to include only hits that exists within a specific distance from a geo point. Assuming the following indexed json:
Then the following simple query can be executed with a
geo_distance
filter:Accepted Formats
In much the same way the
geo_point
type can accept different representation of the geo point, the filter can accept it as well:Lat Lon As Properties
Lat Lon As Array
Lat Lon As String
Geohash
Options
The following are options allowed on the filter:
distance
: The distance to include hits in the filter. The distance can be a numeric value, and then thedistance_unit
(eithermi
/miles
orkm
can be set) controlling the unit. Or a single string with the unit as well.distance_type
: How to compute the distance. Can either bearc
(better precision) orplane
(faster). Defaults toarc
.geo_point
TypeThe filter does not require the
geo_point
type to be set. It assumes that the location object indexed includes alat
andlon
numeric values. Thegeo_point
type follows these rules and allows for more flexible indexing options / structure, but is not required.Multi Location Per Document
The
geo_distance
filter can work with multiple locations / points per document. Once a single location / point matches the filter, the document will be included in the filter.The text was updated successfully, but these errors were encountered: