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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-3 / +2 lines)
Lines 603-609 will have to wait for a real query parser. Link Here
603
sub _convert_index_strings_freeform {
603
sub _convert_index_strings_freeform {
604
    my ( $self, $search ) = @_;
604
    my ( $self, $search ) = @_;
605
    while ( my ( $zeb, $es ) = each %index_field_convert ) {
605
    while ( my ( $zeb, $es ) = each %index_field_convert ) {
606
        $search =~ s/\b$zeb(?:,[\w-]*)?:/$es:/g;
606
        $search =~ s/\b$zeb(?:,[\w\-]*)?:/$es:/g;
607
    }
607
    }
608
    return $search;
608
    return $search;
609
}
609
}
Lines 798-804 sub _truncate_terms { Link Here
798
798
799
    # '"donald duck" title:"the mouse" and peter" get split into
799
    # '"donald duck" title:"the mouse" and peter" get split into
800
    # ['', '"donald duck"', '', ' ', '', 'title:"the mouse"', '', ' ', 'and', ' ', 'pete']
800
    # ['', '"donald duck"', '', ' ', '', 'title:"the mouse"', '', ' ', 'and', ' ', 'pete']
801
    my @tokens = split /((?:[\w-]+:)?"[^"]+"|\s+)/, $query;
801
    my @tokens = split /((?:[\w\-.]+:)?"[^"]+"|\s+)/, $query;
802
802
803
    # Filter out empty tokens
803
    # Filter out empty tokens
804
    my @words = grep { $_ !~ /^\s*$/ } @tokens;
804
    my @words = grep { $_ !~ /^\s*$/ } @tokens;
805
- 

Return to bug 19580