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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-2 / +1 lines)
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 19559