[ 
https://issues.apache.org/jira/browse/LUCENE-10602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551717#comment-17551717
 ] 

Uwe Schindler commented on LUCENE-10602:
----------------------------------------

If all this is needed, why not implement your own QueryCache instance for ES? 
Then you have more control over when and how something is cached or evicted. 
There's no need to use the IndexSearcher#DEFAULT_QUERY_CACHE, you can set you 
own (globally as default per node or per searcher).

Maybe it would be good to get more context, but actualy the cache context is 
more up to the application. IMHO, it should be enough to implement a 
sophisticated 
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/QueryCache.java

The LRUQueryCache in Lucene is just an example.

> Dynamic Index Cache Sizing
> --------------------------
>
>                 Key: LUCENE-10602
>                 URL: https://issues.apache.org/jira/browse/LUCENE-10602
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Chris Earle
>            Priority: Major
>
> Working with Lucene's filter cache, it has become apparent that it can be an 
> enormous drain on the heap and therefore the JVM. After extensive usage of an 
> index, it is not uncommon to tune performance by shrinking or altogether 
> removing the filter cache.
> Lucene tracks hit/miss stats of the filter cache, but it does nothing with 
> the data other than inform an interested user about the effectiveness of 
> their index's caching.
> It would be interesting if Lucene would be able to tune the index filter 
> cache heuristically based on actual usage (age, frequency, and value).
> This could ultimately be used to give GBs of heap back to an individual 
> Lucene instance instead of burning it on cache storage that's not effectively 
> used (or useful).



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to