[
https://issues.apache.org/jira/browse/LUCENE-6463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrien Grand updated LUCENE-6463:
---------------------------------
Attachment: LUCENE-6463.patch
Here is a patch:
- it adds a new RandomAccessWeight that has a simple {{Bits
getMatchingDocs(LeafReaderContext context)}} method that can be overridden to
define matching docs. Such weights will produce scorers with approximations
that match every document and a {{matches()}} method that checks deleted docs
first and then the bits returned by {{getMatchingDocs}}
- it moves David's ConstantScoreScorer to lucene/core and makes other
constant-score queries use it, including ConstantScoreQuery
- it fixes a performance bug in ConstantScoreWeight (parent class of
RandomAccessWeight) in order to use the approximation to check if a document
matched instead of using only the scorer. Otherwise calling explain on a
DocValuesRangeQuery could result in a linear scan.
> Share more logic between our approximated queries
> -------------------------------------------------
>
> Key: LUCENE-6463
> URL: https://issues.apache.org/jira/browse/LUCENE-6463
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-6463.patch
>
>
> We have several queries that support approximations, and in particular the
> ones based on random-access (doc values terms/range, FieldValueFilter, ...)
> duplicate some logic.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]