PLEASE NOTE:
We are working on updating this book for the latest version. Some content might be out of date.
We are working on updating this book for the latest version. Some content might be out of date.
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
: