WARNING: The 1.x versions of Elasticsearch have passed their EOL dates. If you are running a 1.x version, we strongly advise you to upgrade.
This documentation is no longer maintained and may be removed. For the latest information, see the current Elasticsearch documentation.
Geo Shape Filters and Cachingedit
The geo_shape
query and filter perform the same function. The query simply
acts as a filter: any matching documents receive a relevance _score
of
1
. Query results cannot be cached, but filter results can be.
The results are not cached by default. Just as with geo-points, any
change in the coordinates in a shape are likely to produce a different set of
geohashes, so there is little point in caching filter results. That said, if
you filter using the same shapes repeatedly, it can be worth caching the
results, by setting _cache
to true
: