]> git.koha-community.org Git - koha.git/commit
Bug 18213: Add language facets to Elasticsearch
authorNick Clemens <nick@bywatersolutions.com>
Wed, 5 Jul 2017 12:11:35 +0000 (12:11 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 28 Mar 2019 15:57:32 +0000 (15:57 +0000)
commit59918a3c2146a0e558125e246d0ac1b300189cf8
treee61f2400a49cdcdf4514d609afa1bcd9b12b0f6e
parentffef0c0027f81e5420445c33b4f14dfebea9a5b5
Bug 18213: Add language facets to Elasticsearch

This patch add language as a facet to ES results - it adds
a new template plugin for languages to get the appropriate
description given an iso 639-2 code

To test:
1 - Make sure you have records with differing languages (in the MARC21 008
        field characters 35-37 or UNIMARC 101a)
2 - Apply patch
3 - Reload Elasticsearch settings:
http://localhost:8081/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4 - Reindex your records
5 - Search for a phrase that will return results in several languages
6 - Verify you see factes correctly labelled for 'Language'
7 - Verify the facets work
8 - Verify both opac and staff results
9 - prove t/db_dependent/Languages.t

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Languages.pm
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
Koha/SearchEngine/Elasticsearch/Search.pm
admin/searchengine/elasticsearch/mappings.yaml
koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc
t/db_dependent/Languages.t