[ 
https://issues.apache.org/jira/browse/LUCENE-4100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16203596#comment-16203596
 ] 

Adrien Grand commented on LUCENE-4100:
--------------------------------------

bq. Why doesn't it make sense? If i do a query, sorting by reverse time 
(recency), and retrieve the top 20, then i don't need scores, why do i need an 
exact hit count too? I think an approximation would suffice.

Sorry I wrote {{needsTotalHits}} because this is the option name I used on the 
TopScoreDocCollector factory method, but on the weight we'd need something 
different. Because there are two situations in which you would need scores but 
not visit all matches:
 - sorting by score
 - sorting by a field (potentially with early-termination) then score

Yet these cases are different since we can only apply MAXSCORE in the first 
case. So what we need is more something like {{canSkipNonCompetitiveScores}} 
but then this implies that {{needsScores}} is true, so there would be illegal 
combinations. Which is why I went with the enum.

bq. I think naively we want to base it on where we early terminate (as oppose 
to maxdoc) but i get the idea with many clauses. still, i think this estimate 
may be "good enough" because as you paginate, the estimate would get better?

OK I'll give this approach a go.

> Maxscore - Efficient Scoring
> ----------------------------
>
>                 Key: LUCENE-4100
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4100
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/codecs, core/query/scoring, core/search
>    Affects Versions: 4.0-ALPHA
>            Reporter: Stefan Pohl
>              Labels: api-change, gsoc2014, patch, performance
>             Fix For: 4.9, 6.0
>
>         Attachments: LUCENE-4100.patch, LUCENE-4100.patch, 
> contrib_maxscore.tgz, maxscore.patch
>
>
> At Berlin Buzzwords 2012, I will be presenting 'maxscore', an efficient 
> algorithm first published in the IR domain in 1995 by H. Turtle & J. Flood, 
> that I find deserves more attention among Lucene users (and developers).
> I implemented a proof of concept and did some performance measurements with 
> example queries and lucenebench, the package of Mike McCandless, resulting in 
> very significant speedups.
> This ticket is to get started the discussion on including the implementation 
> into Lucene's codebase. Because the technique requires awareness about it 
> from the Lucene user/developer, it seems best to become a contrib/module 
> package so that it consciously can be chosen to be used.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to