You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Doug Sale (JIRA)" <ji...@apache.org> on 2008/07/17 08:49:31 UTC

[jira] Created: (LUCENENET-128) 2 bugs in BooleanScorer2

2 bugs in BooleanScorer2
------------------------

                 Key: LUCENENET-128
                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
             Project: Lucene.Net
          Issue Type: Bug
            Reporter: Doug Sale


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.


[jira] Resolved: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Aroush resolved LUCENENET-128.
-------------------------------------

    Resolution: Fixed

Patch applied and delivered.

> 2 bugs in BooleanScorer2
> ------------------------
>
>                 Key: LUCENENET-128
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Doug Sale
>         Attachments: BooleanScorer2-digy.patch, 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.


[jira] Resolved: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "Doug Sale (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doug Sale resolved LUCENENET-128.
---------------------------------

    Resolution: Fixed

These bug fixes make resolve the following list of test cases:

Lucene.Net.Search.Function.TestCustomScoreQuery.TestCustomScoreByte
Lucene.Net.Search.Function.TestCustomScoreQuery.TestCustomScoreShort
Lucene.Net.Search.Function.TestCustomScoreQuery.TestCustomScoreInt
Lucene.Net.Search.Function.TestCustomScoreQuery.TestCustomScoreFloat

Lucene.Net.Search.Spans.TestSpansAdvanced.TestBooleanQueryWithSpanQueries

Lucene.Net.Search.Spans.TestSpansAdvanced2.TestMultipleDifferentSpanQueries
Lucene.Net.Search.Spans.TestSpansAdvanced2.TestBooleanQueryWithSpanQueries

Lucene.Net.Search.TestBoolean2.TestRandomQueries

Lucene.Net.Search.TestBooleanMinShouldMatch.TestAllOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestOneReqAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestSomeReqAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestOneProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestSomeProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestOneReqOneProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestSomeReqOneProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestOneReqSomeProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestSomeReqSomeProhibAndSomeOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestMinEqualToNumOptional
Lucene.Net.Search.TestBooleanMinShouldMatch.TestOneOptionalEqualToMin
Lucene.Net.Search.TestBooleanMinShouldMatch.TestRandomQueries

Lucene.Net.Search.TestBooleanOr.TestFlat
Lucene.Net.Search.TestBooleanOr.TestParenthesisMust
Lucene.Net.Search.TestBooleanOr.TestParenthesisMust2
Lucene.Net.Search.TestBooleanOr.TestParenthesisShould

Lucene.Net.Search.TestComplexExplanations.Test1
Lucene.Net.Search.TestComplexExplanations.Test2
Lucene.Net.Search.TestComplexExplanations.TestBQ12

Lucene.Net.Search.TestDisjunctionMaxQuery.TestBooleanRequiredEqualScores
Lucene.Net.Search.TestDisjunctionMaxQuery.TestBooleanOptionalNoTiebreaker
Lucene.Net.Search.TestDisjunctionMaxQuery.TestBooleanOptionalWithTiebreaker
Lucene.Net.Search.TestDisjunctionMaxQuery.TestBooleanOptionalWithTiebreakerAndBoost

Lucene.Net.Search.TestPhraseQuery.TestPhraseQueryInConjunctionScorer

Lucene.Net.Search.TestSimpleExplanations.TestDMQ8
Lucene.Net.Search.TestSimpleExplanations.TestDMQ9
Lucene.Net.Search.TestSimpleExplanations.TestBQ1
Lucene.Net.Search.TestSimpleExplanations.TestBQ2
Lucene.Net.Search.TestSimpleExplanations.TestBQ4
Lucene.Net.Search.TestSimpleExplanations.TestBQ5
Lucene.Net.Search.TestSimpleExplanations.TestBQ7
Lucene.Net.Search.TestSimpleExplanations.TestBQ8
Lucene.Net.Search.TestSimpleExplanations.TestBQ9
Lucene.Net.Search.TestSimpleExplanations.TestBQ10
Lucene.Net.Search.TestSimpleExplanations.TestBQ11
Lucene.Net.Search.TestSimpleExplanations.TestBQ20


> 2 bugs in BooleanScorer2
> ------------------------
>
>                 Key: LUCENENET-128
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
>             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.


[jira] Closed: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Aroush closed LUCENENET-128.
-----------------------------------


> 2 bugs in BooleanScorer2
> ------------------------
>
>                 Key: LUCENENET-128
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Doug Sale
>         Attachments: BooleanScorer2-digy.patch, 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.


[jira] Updated: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "Digy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Digy updated LUCENENET-128:
---------------------------

    Attachment: BooleanScorer2-digy.patch

With this simple patch ~40 test cases under search pass.

DIGY

> 2 bugs in BooleanScorer2
> ------------------------
>
>                 Key: LUCENENET-128
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Doug Sale
>         Attachments: BooleanScorer2-digy.patch, 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.


[jira] Reopened: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Aroush reopened LUCENENET-128:
-------------------------------------


Hi Doug,

I compared your patch to the existing Java code and I see divergence from the Java code with the extra code you added.  I'm not sure how/what this is fixing the issue.

Thanks.

-- George

> 2 bugs in BooleanScorer2
> ------------------------
>
>                 Key: LUCENENET-128
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-128
>             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.


[jira] Updated: (LUCENENET-128) 2 bugs in BooleanScorer2

Posted by "Doug Sale (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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: https://issues.apache.org/jira/browse/LUCENENET-128
>             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.