For easier maintance export/import of settings will be great feature.
Import is sort of there already. You can define custom files in koha-conf.xml with the following settings: <elasticsearch_index_config> <elasticsearch_field_config> <elasticsearch_index_mappings> Whenever you reset the mappings in Administration, elasticsearch_index_mappings, if specified, is used to locate the default mappings. When you drop and recreate the index, elasticsearch_index_config and elasticsearch_field_config are used to create the new index. Actually, the only thing missing is export of current mappings. I believe it wouldn't be needed regularly if you decided to use a custom mappings.yaml to define the settings.
I imagine maybe Michal was thinking about something that could be done form the GUI, not requiring access to the server to set/change file paths. Ere - is this behavior below documented somewhere? (wiki or manual?)
True, and I'm not saying they wouldn't be useful, but the files are the only place where the index and field configs are stored, so import/export would be sort of like file transfers. Looks like I may have forgotten to add documentation to the wiki page, I'll fix that.
Thx!
My descriotion fault. I'm thinking about import/export from UI. I think that many librarians hasn't access to server filesystem.
Makes sense. Worth noting is that index config and most aspects of field config are irrelevant unless you can also schedule a full reindexing.
Hi Ere, I agree with you. This bug can solve it beuace give chance to reindex from UI: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22637
Katrin, wiki page updated: https://wiki.koha-community.org/wiki/Elasticsearch#Advanced_Index_Settings
(In reply to Ere Maijala from comment #8) > Katrin, wiki page updated: > https://wiki.koha-community.org/wiki/Elasticsearch#Advanced_Index_Settings Awesome, thank you!
Created attachment 90022 [details] [review] Bug 22639: Elasticsearch ability to export mappings and facets settings With this patch you can download search fields , 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 "Download ... table" - download in (.csv), (.tab), (.ods) - verify that you have the same table in your file than in the search fields table - make the same test for bibliographic records and authorities - Then add some mappings and dowload, your new file has to be modified
Hello, I added a patch to download tables separately. Do you think that a button who download all the tables would be good ?
Hello, I'kk take look on this later today. I set this to Need sign-off.
(In reply to Michal Denar from comment #12) > Hello, > I'kk take look on this later today. I set this to Need sign-off. There is only the export option for now
And do you want the possibility to download the facet order table too in bibliographic records ?
Everything works for me. Download of biblio facets order will be fine. Now we can focuse on import.
Created attachment 90052 [details] [review] Bug 22639: Elasticsearch ability to export mappings and facets settings With this patch you can download search fields , 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 "Download ... table" - download in (.csv), (.tab), (.ods) - verify that you have the same table in your file than in the search fields table - make the same test for bibliographic records and authorities - Then add some mappings and dowload, your new file has to be modified Signed-off-by: Michal Denar <black23@gmail.com>
If this is only for export, please change the bug title accordingly.
Hi Katrin, I hope that folow-ups for import are comming. Export without import feature is useless.
(In reply to Michal Denar from comment #18) > Hi Katrin, > I hope that folow-ups for import are comming. Export without import feature > is useless. Hi, I could work on it next week :)
Hi, great news :-) Thank you
I think it would make sense to either wait or to export on a second depending bug, what do you think?
Created attachment 90151 [details] [review] 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 "Download ... table" - download in (.csv), (.tab), (.ods) - verify that you have the same table in your file than in the search fields table - make the same test for : biblios table : facet order 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
I added the dowload of facet order table
Created attachment 90165 [details] [review] 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 "Download ... table" - download in (.csv), (.tab), (.ods) - verify that you have the same table in your file than in the search fields table - make the same test for : biblios table : facet order 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 Signed-off-by: Michal Denar <black23@gmail.com>
My previous patch must be redone because we can add the export button on the dataTable. You have an example in cgi-bin/koha/circ/pendingreserves.pl Like that the export will be similar with the others page and there will be less code
Created attachment 90601 [details] [review] 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 ps:with this patch you can't download the facet order table
Created attachment 90602 [details] [review] 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
Hello, I remade the patch with DataTable But i found lot of issues to fix: - the export for search field table aren't working good
Hello, I tried my best to remade the patch with DataTable (look 22588 for more info) But i found lot of issues to fix: - the export for search field table aren't working good - when you try do dowload elements in the table that are <select> <option></option> ... </select> that shows all the options in the export table, but we want only the selected option They might be some more issues. Good Luck :)
Bug 23204 added Koha::SearchEngine::Elasticsearch::raw_elasticsearch_mappings()
*** Bug 22994 has been marked as a duplicate of this bug. ***