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

(-)a/Koha/SearchEngine/Elasticsearch/Indexer.pm (-1 lines)
Lines 355-361 sub delete_index { Link Here
355
    my $result = $elasticsearch->bulk(
355
    my $result = $elasticsearch->bulk(
356
        index => $self->index_name,
356
        index => $self->index_name,
357
        type => 'data',
357
        type => 'data',
358
        include_type_name => JSON::true(),
359
        body => \@body,
358
        body => \@body,
360
    );
359
    );
361
    if ($result->{errors}) {
360
    if ($result->{errors}) {
(-)a/cpanfile (-1 / +1 lines)
Lines 94-100 requires 'Plack::Middleware::LogWarn', '0.001002'; Link Here
94
requires 'Plack::Middleware::ReverseProxy', '0.14';
94
requires 'Plack::Middleware::ReverseProxy', '0.14';
95
requires 'Readonly', '2.00';
95
requires 'Readonly', '2.00';
96
requires 'Schedule::At', '1.06';
96
requires 'Schedule::At', '1.06';
97
requires 'Search::Elasticsearch', '6.00';
97
requires 'Search::Elasticsearch', '6.80';
98
requires 'Sereal::Decoder', '3.0';
98
requires 'Sereal::Decoder', '3.0';
99
requires 'Sereal::Encoder', '3.0';
99
requires 'Sereal::Encoder', '3.0';
100
requires 'Storable', '2.20';
100
requires 'Storable', '2.20';
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch.t (-1 / +1 lines)
Lines 135-141 subtest 'get_elasticsearch_mappings() tests' => sub { Link Here
135
    # test reading mappings
135
    # test reading mappings
136
    my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
136
    my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
137
    $mappings = $es->get_elasticsearch_mappings();
137
    $mappings = $es->get_elasticsearch_mappings();
138
    is( $mappings->{data}{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' );
138
    is( $mappings->{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' );
139
};
139
};
140
140
141
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
141
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-44 / +42 lines)
Lines 39-88 $se->mock( 'get_elasticsearch_mappings', sub { Link Here
39
    my %all_mappings;
39
    my %all_mappings;
40
40
41
    my $mappings = {
41
    my $mappings = {
42
        data => {
42
        properties => {
43
            properties => {
43
            title => {
44
                title => {
44
                type => 'text'
45
                    type => 'text'
45
            },
46
                },
46
            title__sort => {
47
                title__sort => {
47
                type => 'text'
48
                    type => 'text'
48
            },
49
                },
49
            subject => {
50
                subject => {
50
                type => 'text',
51
                    type => 'text',
51
                facet => 1
52
                    facet => 1
52
            },
53
                },
53
            'subject-heading-thesaurus' => {
54
                'subject-heading-thesaurus' => {
54
                type => 'text',
55
                    type => 'text',
55
                facet => 1
56
                    facet => 1
56
            },
57
                },
57
            itemnumber => {
58
                itemnumber => {
58
                type => 'integer'
59
                    type => 'integer'
59
            },
60
                },
60
            sortablenumber => {
61
                sortablenumber => {
61
                type => 'integer'
62
                    type => 'integer'
62
            },
63
                },
63
            sortablenumber__sort => {
64
                sortablenumber__sort => {
64
                type => 'integer'
65
                    type => 'integer'
65
            },
66
                },
66
            heading => {
67
                heading => {
67
                type => 'text'
68
                    type => 'text'
68
            },
69
                },
69
            'heading-main' => {
70
                'heading-main' => {
70
                type => 'text'
71
                    type => 'text'
71
            },
72
                },
72
            heading__sort => {
73
                heading__sort => {
73
                type => 'text'
74
                    type => 'text'
74
            },
75
                },
75
            match => {
76
                match => {
76
                type => 'text'
77
                    type => 'text'
77
            },
78
                },
78
            'match-heading' => {
79
                'match-heading' => {
79
                type => 'text'
80
                    type => 'text'
80
            },
81
                },
81
            'match-heading-see-from' => {
82
                'match-heading-see-from' => {
82
                type => 'text'
83
                    type => 'text'
83
            },
84
                },
85
            }
86
        }
84
        }
87
    };
85
    };
88
    $all_mappings{$self->index} = $mappings;
86
    $all_mappings{$self->index} = $mappings;
(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t (-21 / +18 lines)
Lines 31-56 $se->mock( 'get_elasticsearch_mappings', sub { Link Here
31
    my %all_mappings;
31
    my %all_mappings;
32
32
33
    my $mappings = {
33
    my $mappings = {
34
        data => {
34
        properties => {
35
            properties => {
35
            title => {
36
                title => {
36
                type => 'text'
37
                    type => 'text'
37
            },
38
                },
38
            title__sort => {
39
                title__sort => {
39
                type => 'text'
40
                    type => 'text'
40
            },
41
                },
41
            subject => {
42
                subject => {
42
                type => 'text'
43
                    type => 'text'
43
            },
44
                },
44
            itemnumber => {
45
                itemnumber => {
45
                type => 'integer'
46
                    type => 'integer'
46
            },
47
                },
47
            sortablenumber => {
48
                sortablenumber => {
48
                type => 'integer'
49
                    type => 'integer'
49
            },
50
                },
50
            sortablenumber__sort => {
51
                sortablenumber__sort => {
51
                type => 'integer'
52
                    type => 'integer'
53
                }
54
            }
52
            }
55
        }
53
        }
56
    };
54
    };
57
- 

Return to bug 25669