Lines 139-145
sub get_elasticsearch_settings {
Link Here
|
139 |
state $settings = undef; |
139 |
state $settings = undef; |
140 |
if (!defined $settings) { |
140 |
if (!defined $settings) { |
141 |
my $config_file = C4::Context->config('elasticsearch_index_config'); |
141 |
my $config_file = C4::Context->config('elasticsearch_index_config'); |
142 |
$config_file ||= C4::Context->config('intranetdir') . '/etc/searchengine/elasticsearch/index_config.yaml'; |
142 |
$config_file ||= '/etc/koha/searchengine/elasticsearch/index_config.yaml'; |
143 |
$settings = LoadFile( $config_file ); |
143 |
$settings = LoadFile( $config_file ); |
144 |
} |
144 |
} |
145 |
|
145 |
|
Lines 226-232
sub _get_elasticsearch_mapping {
Link Here
|
226 |
state $settings = undef; |
226 |
state $settings = undef; |
227 |
if (!defined $settings) { |
227 |
if (!defined $settings) { |
228 |
my $config_file = C4::Context->config('elasticsearch_field_config'); |
228 |
my $config_file = C4::Context->config('elasticsearch_field_config'); |
229 |
$config_file ||= C4::Context->config('intranetdir') . '/etc/searchengine/elasticsearch/field_config.yaml'; |
229 |
$config_file ||= '/etc/koha/searchengine/elasticsearch/field_config.yaml'; |
230 |
$settings = LoadFile( $config_file ); |
230 |
$settings = LoadFile( $config_file ); |
231 |
} |
231 |
} |
232 |
|
232 |
|
Lines 248-254
sub _get_elasticsearch_mapping {
Link Here
|
248 |
sub reset_elasticsearch_mappings { |
248 |
sub reset_elasticsearch_mappings { |
249 |
my ( $reset_fields ) = @_; |
249 |
my ( $reset_fields ) = @_; |
250 |
my $mappings_yaml = C4::Context->config('elasticsearch_index_mappings'); |
250 |
my $mappings_yaml = C4::Context->config('elasticsearch_index_mappings'); |
251 |
$mappings_yaml ||= C4::Context->config('intranetdir') . '/etc/searchengine/elasticsearch/mappings.yaml'; |
251 |
$mappings_yaml ||= C4::Context->config('intranetdir') . '/admin/searchengine/elasticsearch/mappings.yaml'; |
252 |
my $indexes = LoadFile( $mappings_yaml ); |
252 |
my $indexes = LoadFile( $mappings_yaml ); |
253 |
|
253 |
|
254 |
while ( my ( $index_name, $fields ) = each %$indexes ) { |
254 |
while ( my ( $index_name, $fields ) = each %$indexes ) { |