Ticket #157 (closed defect: released)
Boolean filters shouldn't always combine with AND
| Reported by: | richard | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | QueryParser | Version: | SVN trunk |
| Severity: | normal | Keywords: | |
| Cc: | andreas | Blocked By: | |
| Operating System: | All | Blocking: |
Description
Currently, the query parser always combines boolean filter terms together with AND. In addition, it doesn't handle explicit boolean operators usefully (the result is sometimes useful, but not consistently).
The query parser should be modified to combine boolean filter terms with the same prefix together with OR, and then combine those groups with different prefixes together with AND. The query parser should also respect explicit operators, such that (where a and b are boolean prefixes for A and B).
"a:foo a:bar" becomes "Afoo OR Abar" "a:foo b:bar" becomes "Afoo AND Bbar" "a:foo AND a:bar" becomes "Afoo AND Abar" "a:foo OR b:bar" becomes "Afoo OR Abar"
A tricky case is:
"foo OR a:bar" - this could become "foo OR Abar", but the resulting weights may not be useful.
