lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4903) Add AssertingScorer
Date Sat, 06 Apr 2013 14:23:16 GMT

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

Adrien Grand commented on LUCENE-4903:
--------------------------------------

The problem is that scorers are hard to track: scoring usually happens by calling Scorer.score(Collector),
which itself calls Collector.setScorer(Scorer). Since the asserting scorer delegates to the
wrapped one, the asserting scorer gets lost, this is why Collector.setScorer tries to get
it back by using a weak hash map.

I'm not totally happy with it either and would really like to make Scorer.score(Collector)
use methods from the asserting scorer directly. We can't rely on Scorer.score(Collector)'s
default implementation since it relies on Scorer.nextDoc and some scorers such as BooleanScorer
don't implement this method.
                
> Add AssertingScorer
> -------------------
>
>                 Key: LUCENE-4903
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4903
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-4903.patch
>
>
> I think we would benefit from having an AssertingScorer that would assert that scorers
are advanced correctly, return valid scores (eg. not NaN), ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message