http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10542
--- Comment #18 from David Cook <[email protected]> --- Ah, I believe that Galen was incorrect. QueryParser indeed does appear to handle negation. QueryParser: [Negation via query_plan.pm] (test) && !(suppress:1) OR (test) && -(suppress:1) OR [Negation via node.pm] (test) && (suppress:!"1") OR (test) && (suppress:-"1") (N.B. When negating at the "node" level, you have to wrap the 1 in quotes to treat it as a phrase or else the ! or - appear to be parsed as part of the operand.) CCL: (test) not (suppress:1) If you think about it, "not" really is "and not", so CCL's "not" is equivalent to "&& !" in QP. ------ Ahh...so I've finally read through Martin's patch. tl;dr Martin, if you change the following: $query = "$query -suppress:1"; to: $query = "($query) && -(suppress:1)"; It should work. [Note: If we wanted to add other fields to disallow, we could throw them inside that disallowed group when using QP as well...] -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
