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

Uwe Schindler edited comment on LUCENE-3609 at 11/29/11 8:00 PM:
-----------------------------------------------------------------

Shay,

there was no real change caused by LUCENE-3446 or LUCENE-3458, the logic is 
identical before and after. To be sure I will write a test but if you look at 
the patch it will not change behaviour. The minShouldMatch logic was never 
implemented in BooleanFilter.

There was one small "bug" in the filter before. It handled the case that a 
filter clause returned null different than the case if the clause returned an 
empty bitset/DocIdSet.EMPTY_DOCIDSET. So the whole thing was broken before as 
it was not consistent. Now it behaves exactly as Robert told. 

The minShouldMatch logic was caused by different behaviour on clauses returning 
null instead DocIdSet.EMPTY_DOCIDSET.
                
      was (Author: thetaphi):
    Shay,

there was no change caused by LUCENE-3446 or LUCENE-3458, the logic is 
identical before and after. To be sure I will write a test but if you look at 
the patch it will not change behaviour. The minShouldMatch logic was never 
implemented in BooleanFilter.
                  
> BooleanFilter changed behavior in 3.5, no longer acts as if "minimum should 
> match" set to 1
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3609
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3609
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 3.5
>            Reporter: Shay Banon
>            Assignee: Uwe Schindler
>
> The change LUCENE-3446 causes a change in behavior in BooleanFilter. It used 
> to work as if minimum should match clauses is 1 (compared to BQ lingo), but 
> now, if no should clauses match, then the should clauses are ignored, and for 
> example, if there is a must clause, only that one will be used and returned.
> For example, a single must clause and should clause, with the should clause 
> not matching anything, should not match anything, but, it will match whatever 
> the must clause matches.
> The fix is simple, after iterating over the should clauses, if the aggregated 
> bitset is null, return null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to