View | Details | Raw Unified | Return to bug 31652
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch/Search.pm (-4 lines)
Lines 92-101 sub search { Link Here
92
    }
92
    }
93
    my $elasticsearch = $self->get_elasticsearch();
93
    my $elasticsearch = $self->get_elasticsearch();
94
94
95
    # FixMe: investigate where empty query_string is coming from
96
    delete $query->{query}->{query_string} if
97
      $query->{query}->{query_string} && !%{$query->{query}->{query_string}};
98
99
    my $results = eval {
95
    my $results = eval {
100
        $elasticsearch->search(
96
        $elasticsearch->search(
101
            index => $self->index_name,
97
            index => $self->index_name,
(-)a/installer/data/mysql/atomicupdate/bug_31652_add_geo_search.pl (-8 lines)
Lines 7-23 return { Link Here
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
10
        # Do you stuffs here
11
        $dbh->do(
10
        $dbh->do(
12
            q{ alter table search_field MODIFY COLUMN type enum('','string','date','number','boolean','sum','isbn','stdno','year','callnumber','geo_point') }
11
            q{ alter table search_field MODIFY COLUMN type enum('','string','date','number','boolean','sum','isbn','stdno','year','callnumber','geo_point') }
13
        );
12
        );
14
15
        # Print useful stuff here
16
        say $out "Added new value 'geo_point' to search_field.type enum";
13
        say $out "Added new value 'geo_point' to search_field.type enum";
17
        $dbh->do(
18
            q{INSERT IGNORE INTO systempreferences ( 'variable', 'value', 'options', 'explanation', 'type' ) VALUES ('GeoSearchEnabled', '0', NULL, 'Enable GeoSearch Feature via Elasticsearch', 'YesNo')
19
        say $out "Added new system preference 'GeoSearchEnabled'";
20
12      }
21
        );
22
    },
14
    },
23
};
15
};
(-)a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-2 / +1 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 7;
20
use Test::More tests => 8;
21
use t::lib::Mocks;
21
use t::lib::Mocks;
22
22
23
use_ok('Koha::SearchEngine::Elasticsearch::QueryBuilder');
23
use_ok('Koha::SearchEngine::Elasticsearch::QueryBuilder');
24
- 

Return to bug 31652