From 34c9fbb8b41fd597d1c52a9c2ae98c8456bea808 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 11 Apr 2024 12:24:58 +0000 Subject: [PATCH] Bug 31652: (follow-up) Fix update and remove fixed fixme Update test count as well Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- Koha/SearchEngine/Elasticsearch/Search.pm | 4 ---- .../data/mysql/atomicupdate/bug_31652_add_geo_search.pl | 8 -------- t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 4918ed824d4..12b90cd0ef0 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -92,10 +92,6 @@ sub search { } my $elasticsearch = $self->get_elasticsearch(); - # FixMe: investigate where empty query_string is coming from - delete $query->{query}->{query_string} if - $query->{query}->{query_string} && !%{$query->{query}->{query_string}}; - my $results = eval { $elasticsearch->search( index => $self->index_name, diff --git a/installer/data/mysql/atomicupdate/bug_31652_add_geo_search.pl b/installer/data/mysql/atomicupdate/bug_31652_add_geo_search.pl index 4a6c9ea3e39..f996d47c130 100755 --- a/installer/data/mysql/atomicupdate/bug_31652_add_geo_search.pl +++ b/installer/data/mysql/atomicupdate/bug_31652_add_geo_search.pl @@ -7,17 +7,9 @@ return { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - # Do you stuffs here $dbh->do( q{ alter table search_field MODIFY COLUMN type enum('','string','date','number','boolean','sum','isbn','stdno','year','callnumber','geo_point') } ); - - # Print useful stuff here say $out "Added new value 'geo_point' to search_field.type enum"; - $dbh->do( - q{INSERT IGNORE INTO systempreferences ( 'variable', 'value', 'options', 'explanation', 'type' ) VALUES ('GeoSearchEnabled', '0', NULL, 'Enable GeoSearch Feature via Elasticsearch', 'YesNo') - say $out "Added new system preference 'GeoSearchEnabled'"; -12 } - ); }, }; diff --git a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t index fcafcc6f3f2..b6b670d7d59 100755 --- a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t +++ b/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 7; +use Test::More tests => 8; use t::lib::Mocks; use_ok('Koha::SearchEngine::Elasticsearch::QueryBuilder'); -- 2.39.2