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

Uwe Schindler updated LUCENE-3451:
----------------------------------

    Attachment: LUCENE-3451.patch

Attached a patch with some changes in the BooleanQuery prohibited-only 
detection and all failing tests fixed:
- TestBoolean2 had a explicit prohibited-only query -> changed to assert the UOE
- TestBoolean2 had a random BQ generator. Fixed this generator to not create 
prohibited-only queries
- in TestComplexExplanations* the prohibited-only fake clauses were removed
- MemoryIndexTest used a list of lots of query-strings, some of them looking 
like that : "a -b". If the test had randomly choosen a MockTokenizer with 
english stopwords -> peng. Removed that Analyzer

The last example is one problem of the explicit UOE: Now a user can suddenly 
get UOE if he uses a query where e.g. all positive clauses are stopwords - ok, 
users were always confused about that. Any comments about that?

> Remove special handling of pure negative Filters in BooleanFilter, disallow 
> pure negative queries in BooleanQuery
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3451
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3451
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.0
>
>         Attachments: LUCENE-3451.patch, LUCENE-3451.patch, LUCENE-3451.patch
>
>
> We should at least in Lucene 4.0 remove the hack in BooleanFilter that allows 
> pure negative Filter clauses. This is not supported by BooleanQuery and 
> confuses users (I think that's the problem in LUCENE-3450).
> The hack is buggy, as it does not respect deleted documents and returns them 
> in its DocIdSet.
> Also we should think about disallowing pure-negative Queries at all and throw 
> UOE.

--
This message is automatically generated by JIRA.
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