]> git.koha-community.org Git - koha.git/commit
Bug 23089: Fix sorting on sum and regular fields
authorNick <nick@bywatersolutions.com>
Thu, 10 Oct 2019 16:06:08 +0000 (16:06 +0000)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Wed, 18 Dec 2019 01:22:38 +0000 (14:22 +1300)
commit2b769cbc321ae5a1946b6add1840122afa0ce507
tree132d22011089fb2c9d58151d64917ebf729366bd
parentb94ca526b8b3a6a9685dbf49a898de65bfe0594a
Bug 23089: Fix sorting on sum and regular fields

As of bug 20589 we no longer analyze sort fields and so we no longer need to append ".phrase"
to our sort in searches.

Additionally, sort fields based on 'sum' should also use sum in building the value to sort on

To test:
0 - Be using ES
1 - Find the most circulated item in your collection
2 - Search for '*'
3 - Sort by popularity DESC
4 - Note that item is not first
5 - Try to sort by anything but relevancy, it fails
6 - Apply patch
7 - Redo searches and sorts
8 - Things should now work as expected

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a2ba8b6b23f482dcf8bbe53668d93519a11edf5)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Koha/SearchEngine/Elasticsearch.pm
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
admin/searchengine/elasticsearch/field_config.yaml