34 changes: 0 additions & 34 deletions etc/searchengine/elasticsearch/index_config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion installer/data/mysql/kohastructure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ CREATE TABLE `search_field` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
`label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
`type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum', 'isbn', 'stdno') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
`type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
PRIMARY KEY (`id`),
UNIQUE KEY (`name` (191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,6 @@ a.add, a.delete {
[% ELSE %]
<option value="sum">Sum</option>
[% END %]
[% IF search_field.type == "isbn" %]
<option value="isbn" selected="selected">ISBN</option>
[% ELSE %]
<option value="isbn">ISBN</option>
[% END %]
[% IF search_field.type == "stdno" %]
<option value="stdno" selected="selected">Std. Number</option>
[% ELSE %]
<option value="stdno">Std. Number</option>
[% END %]
</select>
</td>
</tr>
Expand Down
26 changes: 1 addition & 25 deletions t/Koha/SearchEngine/Elasticsearch.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use Modern::Perl;

use Test::More tests => 3;
use Test::More tests => 1;
use Test::Exception;

use t::lib::Mocks;
Expand Down Expand Up @@ -84,27 +84,3 @@ subtest '_read_configuration() tests' => sub {
is( $configuration->{index_name}, 'index', 'Index configuration parsed correctly' );
is_deeply( $configuration->{nodes}, \@servers , 'Server configuration parsed correctly' );
};

subtest 'get_elasticsearch_settings() tests' => sub {

plan tests => 1;

my $settings;

# test reading index settings
my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
$settings = $es->get_elasticsearch_settings();
is( $settings->{index}{analysis}{analyzer}{analyser_phrase}{tokenizer}, 'keyword', 'Index settings parsed correctly' );
};

subtest 'get_elasticsearch_mappings() tests' => sub {

plan tests => 1;

my $mappings;

# test reading mappings
my $es = Koha::SearchEngine::Elasticsearch->new( {index => $Koha::SearchEngine::Elasticsearch::BIBLIOS_INDEX} );
$mappings = $es->get_elasticsearch_mappings();
is( $mappings->{data}{_all}{type}, 'string', 'Field mappings parsed correctly' );
};