[
https://issues.apache.org/jira/browse/SOLR-11684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269201#comment-16269201
]
Yonik Seeley commented on SOLR-11684:
-------------------------------------
bq. LUCENE-7680 adds rules like a term query is always cheap . So don't cache it
Note that the context is different (i.e. lucene looks at caching at every query
level, where Solr currently just looks at the top level).
Benchmarking not caching term queries has been on my TODO list, but I haven't
gotten around to it.
Another approach is to have the context say when a term query (or other
inexpensive query) should or should not be cached. For example, when code will
iterate over many terms in a field, that code should avoid using the filter
cache. There may still be a case for caching term queries in fq params or in
other contexts... but we need testing/benchmarking to figure that out.
> Solr should not cache cheap filters
> -----------------------------------
>
> Key: SOLR-11684
> URL: https://issues.apache.org/jira/browse/SOLR-11684
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Varun Thacker
>
> In the past I've seen clients who disabled the filter cache saw better query
> performance.
> I've never got the chance to investigate this unfortuinately.
> I was reading through
> https://lucidworks.com/2017/11/27/caching-and-filters-and-post-filters/ today
> and this section is something I wanted to revisit
> {code}
> cache=false – Tells Solr that we don't need/want this filter to be cached
> independently for re-use.
> This will allow Solr to evaluate these filters at the same time it's
> processing the main query
> {code}
> Lucene does optimizations like LUCENE-7680 (I think there are more which I
> can link later on). Maybe Solr should also consult
> UsageTrackingQueryCachingPolicy and not cache certain cheap filters?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]