[
https://issues.apache.org/jira/browse/LUCENE-6276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14997705#comment-14997705
]
Adrien Grand commented on LUCENE-6276:
--------------------------------------
bq. ConjunctionDISI matchCost(): give the lower matchCosts a higher weight
We could use the likelyness of a match, which should be given by
Scorer.asTwoPhaseApproximation().approximation().cost()/Scorer.cost() even
though I suspect that most implementations have no way to figure it out (eg.
numeric doc values ranges). But I think we should defer, it's fine to assume
worst case like the patch does today.
bq. TwoPhaseIterator: Return value of matchCost(): long instead of float?
I would be ok with both, but given that matchCost is documented as "an expected
cost in number of simple operations", maybe a long makes more sense? It also
has the benefit of avoiding issues with ±0, Nans, infinities, etc.
bq. Performance test based on Wikipedia to estimate guessed values.
I think this change is very hard to benchmark... I'm personally fine with
moving on here without performance benchmarks.
For other ones that I did not reply to, I suggest that we defer them: I don't
think they should hold this change.
> Add matchCost() api to TwoPhaseDocIdSetIterator
> -----------------------------------------------
>
> Key: LUCENE-6276
> URL: https://issues.apache.org/jira/browse/LUCENE-6276
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: LUCENE-6276-ExactPhraseOnly.patch,
> LUCENE-6276-NoSpans.patch, LUCENE-6276-NoSpans2.patch, LUCENE-6276.patch,
> LUCENE-6276.patch, LUCENE-6276.patch, LUCENE-6276.patch, LUCENE-6276.patch,
> LUCENE-6276.patch, LUCENE-6276.patch
>
>
> We could add a method like TwoPhaseDISI.matchCost() defined as something like
> estimate of nanoseconds or similar.
> ConjunctionScorer could use this method to sort its 'twoPhaseIterators' array
> so that cheaper ones are called first. Today it has no idea if one scorer is
> a simple phrase scorer on a short field vs another that might do some geo
> calculation or more expensive stuff.
> PhraseScorers could implement this based on index statistics (e.g.
> totalTermFreq/maxDoc)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]