lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2686) DisjunctionSumScorer should not call .score on sub scorers until consumer calls .score
Date Mon, 04 Oct 2010 17:38:33 GMT

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

Paul Elschot commented on LUCENE-2686:
--------------------------------------

For the record, the reason for calling score() in the current way is to avoid the housekeeping
of recording which scorer(s) actually matched.

Instead one could perhaps walk the binary tree in the scorer queue heap and only add to the
sum score and recurse into the tree when the current doc of the scorer equals the current
doc. Maybe this can even done without recursive calls.


> DisjunctionSumScorer should not call .score on sub scorers until consumer calls .score
> --------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2686
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2686
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>            Reporter: Michael McCandless
>             Fix For: 3.1, 4.0
>
>
> Spinoff from java-user thread "question about Scorer.freq()" from Koji...
> BooleanScorer2 uses DisjunctionSumScorer to score only-SHOULD-clause boolean queries.
> But, this scorer does too much work for collectors that never call .score, because it
scores while it's matching.  It should only call .score on the subs when the caller calls
its .score.
> This also has the side effect of messing up advanced collectors that gather the freq()
of the subs (using LUCENE-2590).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message