WARNING: Version 1.3 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
GeoShape Query
editGeoShape Query
editQuery version of the geo_shape Filter.
Requires the geo_shape Mapping.
Given a document that looks like this:
{ "name": "Wind & Wetter, Berlin, Germany", "location": { "type": "Point", "coordinates": [13.400544, 52.530286] } }
The following query will find the point:
{ "query": { "geo_shape": { "location": { "shape": { "type": "envelope", "coordinates": [[13, 53],[14, 52]] } } } } }
See the Filter’s documentation for more information.
Relevancy and Score
editCurrently Elasticsearch does not have any notion of geo shape relevancy,
consequently the Query internally uses a constant_score
Query which
wraps a geo_shape
filter.