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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (+1 lines)
Lines 947-952 sub _clean_search_term { Link Here
947
    # Remove unquoted colons that have whitespace on either side of them
947
    # Remove unquoted colons that have whitespace on either side of them
948
    $term =~ s/(:+)(\s+)$lookahead/$2/g;
948
    $term =~ s/(:+)(\s+)$lookahead/$2/g;
949
    $term =~ s/(\s+)(:+)$lookahead/$1/g;
949
    $term =~ s/(\s+)(:+)$lookahead/$1/g;
950
    $term =~ s/^://;
950
951
951
    $term = $self->_query_regex_escape_process($term);
952
    $term = $self->_query_regex_escape_process($term);
952
953
(-)a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-2 / +4 lines)
Lines 187-193 subtest '_split_query() tests' => sub { Link Here
187
};
187
};
188
188
189
subtest '_clean_search_term() tests' => sub {
189
subtest '_clean_search_term() tests' => sub {
190
    plan tests => 11;
190
    plan tests => 12;
191
191
192
    my $qb;
192
    my $qb;
193
    ok(
193
    ok(
Lines 224-229 subtest '_clean_search_term() tests' => sub { Link Here
224
224
225
    $res = $qb->_clean_search_term('ti:test AND kw:test');
225
    $res = $qb->_clean_search_term('ti:test AND kw:test');
226
    is($res, 'title:test AND test', 'ti converted to title, kw converted to empty string, dangling colon removed with space preserved');
226
    is($res, 'title:test AND test', 'ti converted to title, kw converted to empty string, dangling colon removed with space preserved');
227
228
    $res = $qb->_clean_search_term('kw:test');
229
    is($res, 'test', 'kw converted to empty string, dangling colon removed with space preserved');
227
};
230
};
228
231
229
subtest '_join_queries' => sub {
232
subtest '_join_queries' => sub {
230
- 

Return to bug 27597