Slide 6
Slide 6 text
codecentric AG
Understand filters
− Use filters instead of queries whenever you don’t need scoring
− Elasticsearch is able to cache the results of filters
!
− Tricky caching behavior
− Most simple filters are cached by default, but some not (e.g., geo)
− Compound filters (bool/and/or/not) are not cached
− You can still explicitly request caching by setting _cache
− Bool filters query the cache for their (sub-)filters, but and/or/not filters don’t
!
− But: This topic seems to be a moving target
!
− Consider the scope of filters
− Apply to query, facets/aggregations, or both?
− Often „filtered query“ is what you need