Ticket #99 (closed enhancement: released)
[Wishlist bug] Query parser should allow pure NOT queries
| Reported by: | richard | Owned by: | richard |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | QueryParser | Version: | SVN trunk |
| Severity: | minor | Keywords: | |
| Cc: | Blocked By: | #47 | |
| Operating System: | All | Blocking: |
Description
Searches like "NOT apples" or "-pears" should be allowed. These can be implemented by using an all-document iterator (once these are added to the xapian-core) as the left-hand side of the ANDNOT operator.
It should probably be possible to disable this feature using a query parser flag, and it should possibly be disabled by default, since it could result in slow searches (all documents in the database will be searched, by default).
One thing to ponder: if the default operator is OR, should searches like "a (NOT b)" be parsed as "a ANDNOT b", or as "a OR (ALLDOCS ANDNOT b)". (If the default operator is AND, "a AND (ALLDOCS ANDNOT b)" is equivalent to "a ANDNOT b".)
