Bugzilla – Attachment 55918 Details for
Bug 14899
Mapping configuration page for Elastic search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14899: Add a reset option
Bug-14899-Add-a-reset-option.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2016-09-29 11:08:37 UTC
(
hide
)
Description:
Bug 14899: Add a reset option
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-29 11:08:37 UTC
Size:
1.25 KB
patch
obsolete
>From f1aeea6615855770ad20a15b9e1f3b51bec28e1c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 29 Sep 2016 12:03:22 +0100 >Subject: [PATCH] Bug 14899: Add a reset option > >For developpers only at the moment, if you want to reset your mappings, >you can hit: > admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 >--- > admin/searchengine/elasticsearch/mappings.pl | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl >index 5f7712d..7d63002 100755 >--- a/admin/searchengine/elasticsearch/mappings.pl >+++ b/admin/searchengine/elasticsearch/mappings.pl >@@ -21,6 +21,7 @@ use C4::Koha; > use C4::Output; > use C4::Auth; > >+use Koha::SearchEngine::Elasticsearch; > use Koha::SearchMarcMaps; > use Koha::SearchFields; > >@@ -96,6 +97,14 @@ if ( $op eq 'edit' ) { > $schema->storage->txn_commit; > } > } >+elsif( $op eq 'reset' ) { >+ # TODO Move this feature to the interface >+ my $sure = $input->param('i_know_what_i_am_doing'); >+ if ( $sure ) { >+ Koha::SearchMarcMaps->search->delete; >+ Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings; >+ } >+} > > my @indexes; > >-- >2.8.1
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 14899
:
42882
|
42883
|
42884
|
42885
|
42886
|
43054
|
43055
|
43056
|
43057
|
43058
|
43099
|
43353
|
43354
|
43355
|
50995
|
50996
|
50997
|
55915
|
55916
|
55917
|
55918
|
55957
|
55958
|
55959
|
55960
|
56182
|
56183
|
56194
|
56195
|
56196
|
56197
|
56198
|
56199