[Koha-bugs] [Bug 25838] Sort facets values by number of occurrences (Zebra)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 22 09:13:22 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25838

--- Comment #1 from Fridolin SOMERS <fridolin.somers at biblibre.com> ---
Created attachment 106145
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106145&action=edit
Bug 25838: Sort facets values by number of occurrences (Zebra)

Actually with Zebra facets values are sorted alphabetically.

This is a comment from Bug 12478 :
<<
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).
>>

Looks like the sort by number of occurrences is already done in
C4::Search::getRecords, it is an additionnal code that re-sort alphabetically.

This patch proposes to remove it in order to have same sort order between Zebra
and ES.

Test plan :
1) Use Zebra searchengine and enable system preference 'displayFacetCount'
2) Without patch :
3) Perform a search with a lot of results
4) Look at facet author => You see sort is alphabetical (A to Z)
5) Apply patch :
6) Perform the same search
7) Look at facet author => You see sort is by number of occurrences
   decreasing

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list