]> git.koha-community.org Git - koha.git/commit
Bug 29561: Remove blank facets
authorNick Clemens <nick@bywatersolutions.com>
Tue, 23 Nov 2021 14:42:54 +0000 (14:42 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 14 Dec 2022 14:33:27 +0000 (15:33 +0100)
commitf62eae0ca6ad61d8b8609511caa73a40c0c21296
treea5cbd339b085511332e920eab558b90f9aa4c2e9
parent624376b6cb4736dbfdc4ecca4d0acb108051084b
Bug 29561: Remove blank facets

This patch strips the blank facets from the ES aggregations, this seems
to only affect language fields currently, but could affect any facetable field
that can contain blank values

To test:
1 - Have Koha running Elasticsearch with standard test data,
    or add some records with blank values in the 008/35-37
2 - Search for 'a'
3 - Look at the language facets, they should appear normal
4 - Browse to:
    http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=&q=a&sort_by=relevance_dsc&count=20&limit=ln:
5 - Note there is now an 'x' under the Languages facet - to remove a limit you cannot see
6 - Apply patch
7 - Reload
8 - Note the x is not there
9 - Inspect HTML, confirm no blank link under language facets

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eeb12f8a521ccc470d2363fb6529a8c3e0cf78d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3fb3a8c7d684d098b146be1067587563e159f93b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Koha/SearchEngine/Elasticsearch/Search.pm