Description
Nick Clemens
2017-03-05 16:00:11 UTC
Created attachment 64798 [details] [review] 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 Created attachment 64841 [details] [review] Bug 18213 - DB Update (facet order) Created attachment 64905 [details] [review] Bug 18213 - Add Template plugin and fix for C4/Languages Does not apply. fatal: sha1 information is lacking or useless (Koha/SearchEngine/Elasticsearch.pm). Created attachment 68944 [details] [review] 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 Created attachment 68945 [details] [review] Bug 18213 - DB Update (facet order) Created attachment 68946 [details] [review] Bug 18213 - Add Template plugin and fix for C4/Languages I don't dare to rebase it myself ^^ Created attachment 72940 [details] [review] 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 Created attachment 72941 [details] [review] Bug 18213 - DB Update (facet order) Created attachment 72942 [details] [review] Bug 18213 - Add Template plugin and fix for C4/Languages Created attachment 72943 [details] [review] Bug 18213: (follow-up) Correctly sort facets Previously we sorted alphabetically - that works for 1-9. With a 10th facet category we should sort numerically Created attachment 73008 [details] [review] 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> Created attachment 73009 [details] [review] Bug 18213 - DB Update (facet order) Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Created attachment 73010 [details] [review] Bug 18213 - Add Template plugin and fix for C4/Languages Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Created attachment 73011 [details] [review] Bug 18213: (follow-up) Correctly sort facets Previously we sorted alphabetically - that works for 1-9. With a 10th facet category we should sort numerically Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Created attachment 75971 [details] [review] 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> Created attachment 75972 [details] [review] Bug 18213 - DB Update (facet order) Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 75973 [details] [review] Bug 18213 - Add Template plugin and fix for C4/Languages Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Created attachment 75974 [details] [review] Bug 18213: (follow-up) Correctly sort facets Previously we sorted alphabetically - that works for 1-9. With a 10th facet category we should sort numerically Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> dependency bug 18235 passed qa, setting this back to signed off Created attachment 85998 [details] [review] 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> Created attachment 85999 [details] [review] Bug 18213: DB Update (facet order) 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> Created attachment 86000 [details] [review] Bug 18213: Add Template plugin and fix for C4/Languages 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> Created attachment 86001 [details] [review] Bug 18213: (follow-up) Correctly sort facets Previously we sorted alphabetically - that works for 1-9. With a 10th facet category we should sort numerically 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> Awesome work all! Pushed to master for 19.05 Enhancement, will not be backported to 18.11.x series. There is somehow a regression with ES language facets compared to Zebra facets. Zebra language facet is decoded from LANG authorized values list. ES language facet (thanks to this patch) is decoded from language_* tables. But there are more languages defined in LANG authorized values list: all old languages for example, like grc = Ancient Greek (to 1453). Solution : add missing languages to language_* tables. But is it the purpose of those tables which are designed to allow Koha interface translation rather than storing MARC biblio records usable languages? (In reply to Frédéric Demians from comment #29) > There is somehow a regression with ES language facets compared to Zebra > facets. Zebra language facet is decoded from LANG authorized values list. ES > language facet (thanks to this patch) is decoded from language_* tables. But > there are more languages defined in LANG authorized values list: all old > languages for example, like grc = Ancient Greek (to 1453). > > Solution : add missing languages to language_* tables. But is it the purpose > of those tables which are designed to allow Koha interface translation > rather than storing MARC biblio records usable languages? Afaik they are used to build the list of languages on advanced search and also the language options when you have different langaugaes installed. The big win of the tables currently is that they are transalatable/offer the language name in the language of the language (hope that makes sense). That said - are you sure the langauge facet is in standard Koha for Zebra? I don't see a definition for it in getfacets. |