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

Adrien Grand commented on LUCENE-7311:
--------------------------------------

I agree I am not much of a fan either, but opened this issue for discussion 
since it is something that I have seen a couple times already with users who 
have (very) large boolean filters that get reused. Another way to address these 
use-cases would be to have a tiny TermState cache on top of the terms 
dictionary, this way this optimization would be decoupled from the Weight 
implementations (the patch addresses TermQuery but it affects all queries that 
work on top of terms, like eg. phrase queries).

Removing queryNorm is appealing regardless of this change. :)

> TermWeight shoud seek terms lazily
> ----------------------------------
>
>                 Key: LUCENE-7311
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7311
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7311.patch
>
>
> Currently the terms are seeked eagerly in TermQuery.createWeight when 
> creating the TermContext. This might be wasteful when scores are not needed 
> since the query might be cached on some segments, thus seeking the term on 
> these segments is not needed. We could change TermWeight to only seek terms 
> in Weight.scorer when scores are not needed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to