You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2008/01/15 20:11:34 UTC

[jira] Updated: (LUCENE-1134) BooleanQuery.rewrite does not work properly for minNumberShouldMatch

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

Shai Erera updated LUCENE-1134:
-------------------------------

    Attachment: LUCENE-1134.patch

The fix is very trivial. Which tests should I run to ensure this doesn't break anything?

> BooleanQuery.rewrite does not work properly for minNumberShouldMatch
> --------------------------------------------------------------------
>
>                 Key: LUCENE-1134
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1134
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.4
>            Reporter: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-1134.patch
>
>
> BooleanQuery.rewrite does not respect minNumberShouldMatch if the number of clauses is 1. This causes inconsistencies for the queries "+def" and "+abc +def", while setting the minNumShouldMatch to '1' for both.
> For the first query, results are returned although there are no SHOULD clauses in the query.
> For the second query no results are returned.
> The reason lies in the optimization BooleanQuery.rewrite has for one clauses queries.
> Patch included - optimize the query for a single clause only if the minNumShouldMatch <= 0.

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


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