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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-4 / +3 lines)
Lines 791-797 will have to wait for a real query parser. Link Here
791
791
792
sub _convert_index_strings_freeform {
792
sub _convert_index_strings_freeform {
793
    my ( $self, $search ) = @_;
793
    my ( $self, $search ) = @_;
794
    # @TODO: Currenty will alter also fields contained within quotes:
794
    # @TODO: Currently will alter also fields contained within quotes:
795
    # `searching for "stuff cn:123"` for example will become
795
    # `searching for "stuff cn:123"` for example will become
796
    # `searching for "stuff local-number:123"
796
    # `searching for "stuff local-number:123"
797
    #
797
    #
Lines 1028-1036 sub _query_regex_escape_process { Link Here
1028
            # Will escape unescaped slashes (/) while preserving
1028
            # Will escape unescaped slashes (/) while preserving
1029
            # unescaped slashes within quotes
1029
            # unescaped slashes within quotes
1030
            # @TODO: assumes quotes are always balanced and will
1030
            # @TODO: assumes quotes are always balanced and will
1031
            # not handle escaped qoutes properly, should perhaps be
1031
            # not handle escaped quotes properly, should perhaps be
1032
            # replaced with a more general parser solution
1032
            # replaced with a more general parser solution
1033
            # so that this function is ever only provided with unqouted
1033
            # so that this function is ever only provided with unquoted
1034
            # query parts
1034
            # query parts
1035
            $query =~ s@(?:(?<!\\)((?:[\\]{2})*)(?=/))(?![^"]*"(?:[^"]*"[^"]*")*[^"]*$)@\\$1@g;
1035
            $query =~ s@(?:(?<!\\)((?:[\\]{2})*)(?=/))(?![^"]*"(?:[^"]*"[^"]*")*[^"]*$)@\\$1@g;
1036
        }
1036
        }
1037
- 

Return to bug 25375