Currently, when the operator for the "Search: Fulltext search" filter is set to "contains none of these words", we create a query with #negation set and with the conjunction AND. However, that actually means we get "contains not all of these words", as the resulting keys array will be interpreted as NOT (A AND B) (not (NOT A) AND (NOT B)). We should therefore switch the conjunction we use internally to OR for that case.
This couldn't really be noticed on the database backend before, since completely negated keys don't work at all there – see #2127001: The fulltext operator "contains none of these words" is not working.
Why wasn't this noticed on Solr before, you ask? Good question! Turns out the code for negated keys in Solr was buggy all along, too, treating AND and OR essentially the same: see #2127991: Fix handling of negated fulltext keys. Therefore, there were two bugs that neatly cancelled each other out. Nice, right? Unless someone updates the Solr module before this one, things should keep working as before with both these issues committed.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2128001-1--negated_fulltext_keys_operator.patch | 836 bytes | drunken monkey |
Comments
Comment #1
drunken monkeyPatch attached.
Comment #2
gilsbert commentedpatch #1 is working perfectly.
Comment #3
gilsbert commentedHi.
I retested the patch #1 over the last dev version (7.x-1.9+14-dev of november 13th 2013) and it is working.
Regards,
Gilsberty
Comment #4
gilsbert commentedComment #5
drunken monkeyThanks a lot for testing, good to hear it (still) works!
Committed.