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

(-)a/Koha/SearchEngine/Elasticsearch.pm (+6 lines)
Lines 176-183 sub get_elasticsearch_mappings { Link Here
176
            properties => {
176
            properties => {
177
                record => {
177
                record => {
178
                    store          => "true",
178
                    store          => "true",
179
                    copy_to        => "_all_fields",
179
                    type           => "text",
180
                    type           => "text",
180
                },
181
                },
182
                _all_fields => {
183
                    type => "text",
184
                    analyzer => "analyser_standard"
185
                },
181
            }
186
            }
182
        }
187
        }
183
    };
188
    };
Lines 224-229 sub get_elasticsearch_mappings { Link Here
224
                    search_analyzer => "analyser_phrase",
229
                    search_analyzer => "analyser_phrase",
225
                    analyzer  => "analyser_phrase",
230
                    analyzer  => "analyser_phrase",
226
                    type            => "text",
231
                    type            => "text",
232
                    copy_to         => "_all_fields",
227
                    fields          => {
233
                    fields          => {
228
                        phrase => {
234
                        phrase => {
229
                            type            => "keyword",
235
                            type            => "keyword",
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-3 / +3 lines)
Lines 90-95 sub build_query { Link Here
90
            query            => $query,
90
            query            => $query,
91
            fuzziness        => $fuzzy_enabled ? 'auto' : '0',
91
            fuzziness        => $fuzzy_enabled ? 'auto' : '0',
92
            default_operator => 'AND',
92
            default_operator => 'AND',
93
            default_field    => '_all_fields',
93
            lenient          => JSON::true,
94
            lenient          => JSON::true,
94
        }
95
        }
95
    };
96
    };
Lines 292-298 sub build_authorities_query { Link Here
292
    my @filter_parts;
293
    my @filter_parts;
293
    foreach my $s ( @{ $search->{searches} } ) {
294
    foreach my $s ( @{ $search->{searches} } ) {
294
        my ( $wh, $op, $val ) = @{$s}{qw(where operator value)};
295
        my ( $wh, $op, $val ) = @{$s}{qw(where operator value)};
295
        $wh = '_all' if $wh eq '';
296
        $wh = '_all_fields' if $wh eq '';
296
        if ( $op eq 'is' || $op eq '=' ) {
297
        if ( $op eq 'is' || $op eq '=' ) {
297
298
298
            # look for something that matches completely
299
            # look for something that matches completely
Lines 512-518 types. Link Here
512
=cut
513
=cut
513
514
514
our %index_field_convert = (
515
our %index_field_convert = (
515
    'kw'      => '',
516
    'kw'      => '_all_fields',
516
    'ti'      => 'title',
517
    'ti'      => 'title',
517
    'au'      => 'author',
518
    'au'      => 'author',
518
    'su'      => 'subject',
519
    'su'      => 'subject',
519
- 

Return to bug 18969