You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2013/04/10 02:06:17 UTC

[jira] [Comment Edited] (LUCENE-4903) Add AssertingScorer

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

Adrien Grand edited comment on LUCENE-4903 at 4/10/13 12:05 AM:
----------------------------------------------------------------

New patch:

 * borrows Robert's idea to not delegate if the method has not been overridden,

 * AssertingScorer.score(Collector) either calls score(Collector) or score(Collector, NO_MORE_DOCS, nextDoc()) depending on random().nextBoolean()

 * modifies some join scorers so that nextDoc throws UOE instead of iterating out of order

 * adds an assertion to Scorer.score(Collector) to make sure that iteration has not started before this method is called

 * adds an assertion to Scorer.score(Collector, int, int) to make sure that docID() == firstDocID
                
      was (Author: jpountz):
    New patch:

 * borrows Robert's idea to no delegate if the method has not been overridden,

 * AssertingScorer.score(Collector) either calls score(Collector) or score(Collector, NO_MORE_DOCS, nextDoc()) depending on random().nextBoolean()

 * modifies some join scorers so that nextDoc throws UOE instead of iterating out of order

 * adds an assertion to Scorer.score(Collector) to make sure that iteration has not started before this method is called

 * adds an assertion to Scorer.score(Collector, int, int) to make sure that docID() == firstDocID
                  
> 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, 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