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

ASF subversion and git services commented on LUCENE-8058:
---------------------------------------------------------

Commit 37ac122ecfbe75413f2037b0849cbbf2eeb3e76f in lucene-solr's branch 
refs/heads/branch_7x from [~jpountz]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=37ac122 ]

LUCENE-8058: Large instances of TermInSetQuery are no longer eligible for 
caching as they could break memory accounting of the query cache.


> Never cache large TermInSetQuery instances
> ------------------------------------------
>
>                 Key: LUCENE-8058
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8058
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>             Fix For: master (8.0), 7.2
>
>         Attachments: LUCENE-8058.patch, LUCENE-8058.patch
>
>
> I have seen several cases in which the query cache was highly underestimating 
> its memory usage due to the fact that it had references to large queries that 
> ended up using more memory than the associated doc id sets.
> We had a workaround for term-in-set queries by making TermInSetQuery 
> implement Accountable, but this information is lost when it is wrapped in 
> another query such as a BooleanQuery. So I would like to apply a safer fix 
> that just disables caching on large TermInSetQuery instances.
> I know it's a pity given that large queries are probably more expensive and 
> thus more cache-worthy, but I see such large queries as the result of a bad 
> design or a workaround to the fact that Lucene is not the right tool for the 
> job, so I think that disabling caching on large term-in-set queries is the 
> right trade-off by making the query cache safer for the majority of our users.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to