[
https://issues.apache.org/jira/browse/LUCENE-6639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Terry Smith updated LUCENE-6639:
--------------------------------
Attachment: LUCENE-6639.patch
Attached unit test will fail if the extra IndexWriter.commit() gets triggered
or the BooleanQuery clauses are shuffled to make the first clauses' scorer null
for the first segment.
> LRUQueryCache.CachingWrapperWeight not calling policy.onUse() if the first
> scorer is skipped
> --------------------------------------------------------------------------------------------
>
> Key: LUCENE-6639
> URL: https://issues.apache.org/jira/browse/LUCENE-6639
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: 5.3
> Reporter: Terry Smith
> Priority: Minor
> Attachments: LUCENE-6639.patch
>
>
> The method
> {{org.apache.lucene.search.LRUQueryCache.CachingWrapperWeight.scorer(LeafReaderContext)}}
> starts with
> {code}
> if (context.ord == 0) {
> policy.onUse(getQuery());
> }
> {code}
> which can result in a missed call for queries that return a null scorer for
> the first segment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]