From dc8348576b4e523e9f89d32f967b2c80996c4be9 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 26 Feb 2018 12:05:37 -0500 Subject: [PATCH] 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 --- .../Application/Storage/Driver/Pg/QueryParser.pm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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 -- 2.43.2