Bug 12478: Display facet terms ordered by number of occurrences
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Oct 2015 09:45:32 +0000 (10:45 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 26 Apr 2016 13:01:30 +0000 (10:01 -0300)
commit72d338b3ee381d7944fecb095c2fc7d2767c72cf
treeef724786bc546595010026556e018c1d9dc6ddba
parent15a863fe1d6d7ecfe9b08230160128e0288748a1
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>
C4/Search.pm
Koha/SearchEngine/Elasticsearch/Search.pm
catalogue/search.pl
opac/opac-search.pl