Bugzilla – Attachment 90602 Details for
Bug 22639
Elasticsearch ability export mappings and facets settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22639: Elasticsearch ability to export mappings and facets settings
Bug-22639-Elasticsearch-ability-to-export-mappings.patch (text/plain), 4.73 KB, created by
axel Amghar
on 2019-06-14 14:10:14 UTC
(
hide
)
Description:
Bug 22639: Elasticsearch ability to export mappings and facets settings
Filename:
MIME Type:
Creator:
axel Amghar
Created:
2019-06-14 14:10:14 UTC
Size:
4.73 KB
patch
obsolete
>From 0a1c3947c33d0527fbafdbc13750393c58d6f106 Mon Sep 17 00:00:00 2001 >From: Axel Amghar <axel.amghar@biblibre.com> >Date: Fri, 14 Jun 2019 15:45:20 +0200 >Subject: [PATCH] Bug 22639: Elasticsearch ability to export mappings and > facets settings > >With this patch you can download search fields , facets order, biblios and authorities table in search engine configuration > >Test plan: >- apply the patch >- make sure you have "elasticsearch" as value for the syspref "SearchEngine" >- go to search engine configuration in the admin page >- in the search fields part, you have a button "Export" >- verify all formats are correct >- verify that you have the same table in your file than in the search fields table >- make the same test for > : biblios table > : authorities table >- Add some mappings, modify some fields, change the facets order >- Save your modifications >- Then dowload again >- Your new files must be modified > >- You can remove some colomns to dowload only Name and label columns for example > >ps: with this patch you can't download the facet order table >--- > admin/columns_settings.yml | 34 ++++++++++++++++++++++ > .../admin/searchengine/elasticsearch/mappings.tt | 17 +++++++---- > 2 files changed, 45 insertions(+), 6 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index f484ed9..9d1e7ce 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -176,6 +176,40 @@ modules: > cannot_be_toggled: 1 > cannot_be_modified: 1 > >+ mappings: >+ search-field-table: >+ - >+ columnname: name >+ - >+ columnname: label >+ - >+ columnname: type >+ - >+ columnname: weight >+ >+ bilios-table: >+ - >+ columnname: search_field >+ - >+ columnname: sortable >+ - >+ columnname: facetable >+ - >+ columnname: suggestible >+ - >+ columnname: mapping >+ >+ auth-table: >+ - >+ columnname: search_field >+ - >+ columnname: sortable >+ - >+ columnname: facetable >+ - >+ columnname: suggestible >+ - >+ columnname: mapping > > catalogue: > detail: >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >index d5b6f76..001c0c8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt >@@ -1,10 +1,12 @@ > [% USE raw %] > [% USE Asset %] >+[% USE ColumnsSettings %] > [% PROCESS 'i18n.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Search engine configuration</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'datatables.inc' %] >+[% INCLUDE 'columns_settings.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.tablednd.js") | $raw %] > [% Asset.css("css/datatables.css") | $raw %] > <script> >@@ -66,27 +68,30 @@ > } > > $(document).ready(function() { >+ let columns_settings_search_fields = [% ColumnsSettings.GetColumns('admin', 'mappings', 'search-field-table', 'json') | $raw %]; >+ let columns_settings_biblios = [% ColumnsSettings.GetColumns('admin', 'mappings', 'bilios-table', 'json') | $raw %]; >+ let columns_settings_authorities = [% ColumnsSettings.GetColumns('admin', 'mappings', 'auth-table', 'json') | $raw %]; > $("#tabs").tabs(); >- searchfieldst = $('#search-fieldst').dataTable($.extend(true, {}, dataTablesDefaults, { >+ searchfieldst = KohaTable("search-fieldst", { > "aoColumnDefs": [ > { "sType": "string", "aTargets": [ "string-sort" ] } > ], > "sPaginationType": "full_numbers", >- })); >+ }, columns_settings_search_fields); > >- bibliost = $('#bibliost').dataTable($.extend(true, {}, dataTablesDefaults, { >+ bibliost = KohaTable("bibliost", { > "aoColumnDefs": [ > { "sType": "string", "aTargets": [ "string-sort" ] } > ], > "sPaginationType": "full_numbers", >- })); >+ }, columns_settings_biblios); > >- authoritiest = $('#authoritiest').dataTable($.extend(true, {}, dataTablesDefaults, { >+ authoritiest = KohaTable("authoritiest" ,{ > "aoColumnDefs": [ > { "sType": "string", "aTargets": [ "string-sort" ] } > ], > "sPaginationType": "full_numbers", >- })); >+ }, columns_settings_authorities); > > $('#save').click(function() { > show_all_rows(); >-- >2.7.4
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 22639
:
90022
|
90052
|
90151
|
90165
|
90601
| 90602