[
https://issues.apache.org/jira/browse/LUCENE-10446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499546#comment-17499546
]
Adrien Grand commented on LUCENE-10446:
---------------------------------------
I agree with you that IndexOrDocValuesQuery sometimes makes the wrong choice,
but I'm not happy with the API change.
I left a similar comment on LUCENE-10425: I think that one way we could make
the situation better would be by implementing LUCENE-10162 to create fields
that index both points and doc values. Then factory methods on these fields
would know exactly how the field is indexed and they could make the best
decision without having to hurt the API by merging what PointRangeQuery,
IndexOrDocValuesQuery and IndexSortSortedNumericDocValuesRangeQuery do:
- If the points index tells us that all docs match, then return
DocIdSetIterator#range(0,maxDoc).
- If the field is the primary index sort, then use the index to figure out the
min and max values and return the appropriate range.
- Otherwise do what IndexOrDocValuesQuery is doing today.
One thought I had in mind when opening LUCENE-10162 was that we could return
queries that can more easily do the right thing because they know both
> Add a precise cost of score in ScorerSupplier
> ---------------------------------------------
>
> Key: LUCENE-10446
> URL: https://issues.apache.org/jira/browse/LUCENE-10446
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Lu Xugang
> Priority: Minor
> Attachments: LUCENE-10446.patch
>
>
> Some queries could sometime actually provide a precise cost of Score like
> RangeFieldQuery, PointRangeQuery, SpatialQuery. maybe we could do some
> optimization by using this precise cost.
> Like in IndexOrDocValuesQuery, when indexScorerSupplier or/and
> dvScorerSupplier's precise cost is reader.maxDoc, we will supply the right
> Scorer instead of according to the condition of threshold <= leadCost which
> sometime supply a inappropriate Score when IndexOrDocValuesQuery not a lead
> iterator.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]