Bug 40722: Add a log when resetting mappings during elastic rebuild
The command currently logs when deleting indexes and indexing records, it would be helpful to have a log when resetting the mappings, and to log which mapping file has been used. To test: 1 - perl misc/search_tools/rebuild_elasticsearch.pl -r 2 - No log of reset 3 - Apply patch 4 - perl misc/search_tools/rebuild_elasticsearch.pl -r 5 - Note reset is logged Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
4cadd40278
commit
deb11ee1c8
|
|
@ -169,6 +169,9 @@ pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;
|
|||
_sanity_check();
|
||||
|
||||
if ($reset) {
|
||||
my $mappings_yaml = C4::Context->config('elasticsearch_index_mappings');
|
||||
$mappings_yaml ||= C4::Context->config('intranetdir') . '/admin/searchengine/elasticsearch/mappings.yaml';
|
||||
_log( 1, "Resetting mappings from $mappings_yaml\n" );
|
||||
Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
|
||||
$delete = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue