From: Mike Rylander Date: Fri, 14 Sep 2012 18:28:20 +0000 (-0400) Subject: Convert negated words to unphrases, like we do with +d words to phrases X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8a709bf9ca16355d74f1791483e23a13aea03ed6;p=contrib%2FConifer.git Convert negated words to unphrases, like we do with +d words to phrases Signed-off-by: Mike Rylander Signed-off-by: Thomas Berezansky Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm index 0968a18289..a5950aff7f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm @@ -1165,10 +1165,10 @@ sub decompose { local $last_type = ''; - } elsif (/^\s*$required_re([^${group_end}${float_end}\s"]+)/) { # phrase, always anded + } elsif (/^\s*($required_re|$disallowed_re)([^${group_end}${float_end}\s"]+)/) { # convert require/disallow word to {un}phrase warn ' 'x$recursing."Encountered required atom (mini phrase), transforming for phrase parse: $1\n" if $self->debug; - $_ = '"' . $1 . '"' . $'; + $_ = $1 . '"' . $2 . '"' . $'; local $last_type = ''; } elsif (/^\s*([^${group_end}${float_end}\s]+)/o) { # atom