lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Sale (JIRA)" <>
Subject [jira] Updated: (LUCENENET-128) 2 bugs in BooleanScorer2
Date Thu, 17 Jul 2008 07:07:31 GMT


Doug Sale updated LUCENENET-128:

    Attachment: BooleanScorer2.patch

BooleanScorer2 contains multiple scorers, an overall scorer, and a coordinator that generates
a factor to be multiplied against the summed score to generate the final score for a document.

Score() was re-initializing the overall scorer data structure on every call, including resetting
the coordinator.  Each individual Scorer, however, is tracking the most recent scored document
and not re-scoring if the request is for the same doc as the last request.

So, on subsequent calls to Score(), the coordinator factor was being reset to 0.  The individual
scorers, responsible for updating the pointer to the correct coordinator factor weren't doing
so, as they essentially no-op'd on a request for the same doc score as the prior request.

Thus, subsequent calls for the same doc returned a score of 0.

Additionally, SingleMatchScorer was updating the coordinator pointer in all cases, though
it seems it was not intended.  There was a test for the same document as the prior call, but
it was implemented incorrectly.

So, the fixes were:
1) Track the lastDocumentID at the top-level scorer and do not re-init the scorer data structures
when the subsequent call is for the same document as the prior.
2) Fix the "same doc as last request" test in SingleMatchScorer

> 2 bugs in BooleanScorer2
> ------------------------
>                 Key: LUCENENET-128
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Doug Sale
>         Attachments: BooleanScorer2.patch
>   Original Estimate: 0h
>  Remaining Estimate: 0h
> When BooleanScorer2.Score() is called in succession for the same Document, the second
invocation always returns a score of 0. 

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

View raw message