i have about 10M docs in index and update rate about 3 requests per second. i want to know should i use query or request caches or they will be invalidated all the time. Also i use some term filter by for particluar fields in my queries. let assume it is cached. If i change documents having another value for that field, will this cache be also invalidated?
The filter cache is per segment so it should kick in quite well for you
automatically. Just make sure to put the things you want to cache in
constant score queries or the filter clause of the bool query.
The request cache is for the whole index so it likely won't help unless you
have two indexes, one that you don't update frequently and one that you do.
I believe this cache is disabled by default in 2.x. You should do some
research if you think it will help you.
yes it will thx, i didn't know it is per segment