Bulk doesn't support include_type_name, update requirement to
Search::Elasticseach@6.80, and remove data type name from tests.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
my $result = $elasticsearch->bulk(
index => $self->index_name,
type => 'data',
my $result = $elasticsearch->bulk(
index => $self->index_name,
type => 'data',
- include_type_name => JSON::true(),
body => \@body,
);
if ($result->{errors}) {
body => \@body,
);
if ($result->{errors}) {
requires 'Plack::Middleware::ReverseProxy', '0.14';
requires 'Readonly', '2.00';
requires 'Schedule::At', '1.06';
requires 'Plack::Middleware::ReverseProxy', '0.14';
requires 'Readonly', '2.00';
requires 'Schedule::At', '1.06';
-requires 'Search::Elasticsearch', '6.00';
+requires 'Search::Elasticsearch', '6.80';
requires 'Sereal::Decoder', '3.0';
requires 'Sereal::Encoder', '3.0';
requires 'Storable', '2.20';
requires 'Sereal::Decoder', '3.0';
requires 'Sereal::Encoder', '3.0';
requires 'Storable', '2.20';
# test reading mappings
my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
$mappings = $es->get_elasticsearch_mappings();
# test reading mappings
my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
$mappings = $es->get_elasticsearch_mappings();
- is( $mappings->{data}{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' );
+ is( $mappings->{properties}{isbn__sort}{index}, 'false', 'Field mappings parsed correctly' );
};
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
};
subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () tests' => sub {
my %all_mappings;
my $mappings = {
my %all_mappings;
my $mappings = {
- data => {
- properties => {
- title => {
- type => 'text'
- },
- title__sort => {
- type => 'text'
- },
- subject => {
- type => 'text',
- facet => 1
- },
- 'subject-heading-thesaurus' => {
- type => 'text',
- facet => 1
- },
- itemnumber => {
- type => 'integer'
- },
- sortablenumber => {
- type => 'integer'
- },
- sortablenumber__sort => {
- type => 'integer'
- },
- heading => {
- type => 'text'
- },
- 'heading-main' => {
- type => 'text'
- },
- heading__sort => {
- type => 'text'
- },
- match => {
- type => 'text'
- },
- 'match-heading' => {
- type => 'text'
- },
- 'match-heading-see-from' => {
- type => 'text'
- },
- }
+ properties => {
+ title => {
+ type => 'text'
+ },
+ title__sort => {
+ type => 'text'
+ },
+ subject => {
+ type => 'text',
+ facet => 1
+ },
+ 'subject-heading-thesaurus' => {
+ type => 'text',
+ facet => 1
+ },
+ itemnumber => {
+ type => 'integer'
+ },
+ sortablenumber => {
+ type => 'integer'
+ },
+ sortablenumber__sort => {
+ type => 'integer'
+ },
+ heading => {
+ type => 'text'
+ },
+ 'heading-main' => {
+ type => 'text'
+ },
+ heading__sort => {
+ type => 'text'
+ },
+ match => {
+ type => 'text'
+ },
+ 'match-heading' => {
+ type => 'text'
+ },
+ 'match-heading-see-from' => {
+ type => 'text'
+ },
}
};
$all_mappings{$self->index} = $mappings;
}
};
$all_mappings{$self->index} = $mappings;
my %all_mappings;
my $mappings = {
my %all_mappings;
my $mappings = {
- data => {
- properties => {
- title => {
- type => 'text'
- },
- title__sort => {
- type => 'text'
- },
- subject => {
- type => 'text'
- },
- itemnumber => {
- type => 'integer'
- },
- sortablenumber => {
- type => 'integer'
- },
- sortablenumber__sort => {
- type => 'integer'
- }
+ properties => {
+ title => {
+ type => 'text'
+ },
+ title__sort => {
+ type => 'text'
+ },
+ subject => {
+ type => 'text'
+ },
+ itemnumber => {
+ type => 'integer'
+ },
+ sortablenumber => {
+ type => 'integer'
+ },
+ sortablenumber__sort => {
+ type => 'integer'