From: Mike Rylander Date: Mon, 26 Feb 2018 17:05:37 +0000 (-0500) Subject: LP#1744385: Treat phrase terms the same as non-phrase terms WRT dictionaries X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dc8348576b4e523e9f89d32f967b2c80996c4be9;p=evergreen%2Ftadl.git LP#1744385: Treat phrase terms the same as non-phrase terms WRT dictionaries Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index bd223cb4eb..b3e64eb360 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -1805,19 +1805,14 @@ sub buildSQL { $lang ||= $self->node->plan->QueryParser->default_preferred_language; my $ts_configs = []; - if (@{$self->node->phrases}) { - # We assume we want 'simple' for phrases. Gives us less to match against later. - $ts_configs = ['simple']; + if (!@$fields) { + $ts_configs = $self->node->plan->QueryParser->class_ts_config($classname, $lang); } else { - if (!@$fields) { - $ts_configs = $self->node->plan->QueryParser->class_ts_config($classname, $lang); - } else { - for my $field (@$fields) { - push @$ts_configs, @{$self->node->plan->QueryParser->field_ts_config($classname, $field, $lang)}; - } + for my $field (@$fields) { + push @$ts_configs, @{$self->node->plan->QueryParser->field_ts_config($classname, $field, $lang)}; } - $ts_configs = [keys %{{map { $_ => 1 } @$ts_configs}}]; } + $ts_configs = [keys %{{map { $_ => 1 } @$ts_configs}}]; # Assume we want exact if none otherwise provided. # Because we can reasonably expect this to exist