[
https://issues.apache.org/jira/browse/LUCENE-6276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955579#comment-14955579
]
Paul Elschot commented on LUCENE-6276:
--------------------------------------
bq. ... unhappy about adding a method to TermStatistics, this class should
remain as simple as possible. Can we make it private to PhraseWeight?
Why should TermStatistics remain as simple as possible? Having a method that
returns an expected value in a ...Statistics class looks just right to me.
I initially had the code in PhraseWeight, but there many getter methods from
TermStatistics were used, so I moved the method to TermStatistics and used the
return value as the match cost for a single term in PhraseWeight.
I think we will need the same thing for spans (multiplied with a factor 4 or
so), and in that case the method will have to be public, because the spans are
in a different package. Can we reconsider moving the method until the spans are
done here?
bq. ... only use TwoPhaseIterator.matchCost to sort
TwoPhaseConjunctionDISI.twoPhaseIterators.
I missed that, I'll introduce it.
> 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
>
>
> 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]