KMAIN-110 KCLS-98 Title matches exactly
authorBill Erickson <berickxx@gmail.com>
Wed, 29 Oct 2014 21:06:55 +0000 (17:06 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
    Cross-port: a217a39

Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm

index d7fe36e..d9f5752 100644 (file)
@@ -1352,12 +1352,12 @@ sub flatten {
                 $where .= "$NOT(" . $talias . ".id IS NOT NULL";
                 if (@{$node->phrases}) {
                     $where .= ' AND ' . join(' AND ', map {
-                        "${talias}.value ~* ".$self->QueryParser->quote_phrase_value($_, 1)
+                        "${talias}.value ~* search_normalize(".$self->QueryParser->quote_phrase_value($_, 1).")"
                     } @{$node->phrases});
                 } else {
                     for my $atom (@{$node->only_real_atoms}) {
                         next unless $atom->{content} && $atom->{content} =~ /(^\^|\$$)/;
-                        $where .= " AND ${talias}.value ~* ".$self->QueryParser->quote_phrase_value($atom->{content});
+                        $where .= " AND ${talias}.value ~* search_normalize(".$self->QueryParser->quote_phrase_value($atom->{content}).")";
                     }
                 }
                 $where .= ')';