Bug 12478: Display facet terms ordered by number of occurrences
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Oct 2015 14:29:52 +0000 (15:29 +0100)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:11 +0000 (20:20 +0000)
commit246f2dddaf6bc23f0b574113166171d4e2786e9e
treecfc07dbf8ee95680f0c739e8c8a888cc1d80622b
parent7a9d8d6b29c3ab215a0e5493752bfa282d9fff8a
Bug 12478: Display facet terms ordered by number of occurrences

By default ES returns the facet terms ordered by most used, which makes
sense.

This patch removes resort done in the scripts (catalogue/search.pl and
opac/opac-search.pl) and moves it to the module.

For Zebra it's now done in C4::Search::getRecords, and there is no
change to expect (still alphabetically).

On the Elastic search side, we could imagine to let the library define
the order of the facets. The facet terms are now sorted by most used.

To test easily this change, turn on the displayFacetCount pref.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
C4/Search.pm
Koha/SearchEngine/Elasticsearch/Search.pm
catalogue/search.pl
opac/opac-search.pl