[
https://issues.apache.org/jira/browse/LUCENE-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148973#comment-13148973
]
Yonik Seeley commented on LUCENE-3451:
--------------------------------------
The current handling of boolean queries with only prohibited clauses is not a
bug, but working as designed, so this issue is about changing that behavior.
Currently working applications will now start unexpectedly throwing
exceptions... now that's trappy.
bq. I think we should also backport to 3.x? And advertise the breakage. If
users hit this exception it means their current searches aren't working
We shouldn't make assumptions like that - those applications may be working
exactly as designed.
The issue with stopwords is complex - there is no *right* way IMO (returning
all documents vs no documents), and some users will continue to be surprised by
the results regardless of which you do.
Changing BQ to prohibit negative queries means that it will immediately mean
that our QueryParser (and maybe other code) has a very serious bug. This issue
can't be committed without addressing other parts of Lucene and Solr that can
generate negative queries first.
I'm currently leaning toward the current behavior of BQ.
> 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,
> 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.
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: [email protected]
For additional commands, e-mail: [email protected]