[ 
https://issues.apache.org/jira/browse/LUCENE-6758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Terry Smith updated LUCENE-6758:
--------------------------------
    Attachment: LUCENE-6758.patch

Run this unit test a few times and you'll hit a failure when DefaultSimilarity 
is picked.

The method testBQHitOrEmpty() will fail because the score is zero. It's friend 
testBQHitOrMiss() has a non-zero score.

The difference between the two is that the field "empty" is unused, whereas the 
field "test" has one token ("hit").


> Adding a SHOULD clause to a BQ over an empty field clears the score when 
> using DefaultSimilarity
> ------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-6758
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6758
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: Trunk
>            Reporter: Terry Smith
>         Attachments: LUCENE-6758.patch
>
>
> Patch with unit test to show the bug will be attached.
> I've narrowed this change in behavior with git bisect to the following commit:
> {noformat}
> commit 698b4b56f0f2463b21c9e3bc67b8b47d635b7d1f
> Author: Robert Muir <rm...@apache.org>
> Date:   Thu Aug 13 17:37:15 2015 +0000
>     LUCENE-6711: Use CollectionStatistics.docCount() for IDF and average 
> field length computations
>     
>     git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695744 
> 13f79535-47bb-0310-9956-ffa450edef68
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to