Term filters already use lucene's term dictionary as an index. Almost
everything Elasticsearch does uses it. In fact term queries are so fast
that Elasticsearch switched them from being cached by default to uncached
by default (don't have version number handy). For the most part I wouldn't
worry ab
Thanks for the explanation.
A follow-up question. If caching the filter for a specific value, say "{
"term": { "status": "paid" } }", will this somehow magically speed up the
query if searching for "status": "unpaid"? I'm not talking about a "not"
operation, but simply replacing the value with som
The status filter cache will indeed contain all entries. And technically,
the cache is per segment, and not across all documents, but this should be
transparent.
Caching is enabled by default for the term filters, but disabled for the
bool filter. You can enable it if you think users will be reusi
Hi,
I have a search request that uses a couple of filters. I'm using bool+must,
and I'm trying to optimize the request as much as possible.
- Some filters are used by all users of my platform, but aren't very
selective.
- Some filters are very specific to individual users, and are highly
selec