diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 81b1a8dea5..bb730d290c 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -285,7 +285,7 @@ sub reset_elasticsearch_mappings { my $field_label = $data->{label}; my $mappings = $data->{mappings}; my $facet_order = $data->{facet_order}; - my $search_field = Koha::SearchFields->find_or_create({ + my $search_field = Koha::SearchFields->find_or_create({ name => $field_name, label => $field_label, type => $field_type, diff --git a/t/db_dependent/Koha_Elasticsearch.t b/t/db_dependent/Koha_Elasticsearch.t index d96c8ff152..078d55d659 100644 --- a/t/db_dependent/Koha_Elasticsearch.t +++ b/t/db_dependent/Koha_Elasticsearch.t @@ -23,6 +23,7 @@ use t::lib::TestBuilder; use MARC::Record; use Koha::SearchFields; +use Koha::SearchEngine::Elasticsearch; my $schema = Koha::Database->schema; my $builder = t::lib::TestBuilder->new;