Bugzilla – Attachment 185853 Details for
Bug 40722
Add logging to reset of elastic mappings files when rebuilding elastic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40722: Add a log when resetting mappings during elastic rebuild
Bug-40722-Add-a-log-when-resetting-mappings-during.patch (text/plain), 1.41 KB, created by
Nick Clemens (kidclamp)
on 2025-08-28 16:23:21 UTC
(
hide
)
Description:
Bug 40722: Add a log when resetting mappings during elastic rebuild
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-08-28 16:23:21 UTC
Size:
1.41 KB
patch
obsolete
>From 122b28bbfe40c1f75c10788fe9c3d739eaa2e302 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 28 Aug 2025 16:20:24 +0000 >Subject: [PATCH] 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> >--- > misc/search_tools/rebuild_elasticsearch.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/misc/search_tools/rebuild_elasticsearch.pl b/misc/search_tools/rebuild_elasticsearch.pl >index 43dc6452e22..5198fe1c8fa 100755 >--- a/misc/search_tools/rebuild_elasticsearch.pl >+++ b/misc/search_tools/rebuild_elasticsearch.pl >@@ -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; > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40722
:
185852
| 185853