Bug 28610: Elasticsearch 7 - hits.total is now an object
authorKevin Carnes <kevin.carnes@ub.lu.se>
Tue, 8 Feb 2022 13:48:19 +0000 (14:48 +0100)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Thu, 8 Sep 2022 03:26:38 +0000 (05:26 +0200)
commit4086c1c4ff57c46881e4e44e06672eae7091373c
treec24c2ffbdf5343bb8deff27c439e15990c969c62
parent1708317b7b9ff2e975cb60de4f9fb0a586bfe825
Bug 28610: Elasticsearch 7 - hits.total is now an object

In Elasticsearch 7 hits.total is now an object which is not always an exact
value. You can always get an exact total by adding a track_total_hits
parameter set to true when using the Elasticsearch search method

To test:
1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
2) If you observe an error about types, apply patch for bug 25669
3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4) Observe that tests with count fail
5) Apply patch
6) Observe that tests with count pass
7) Sign off

Sponsored-by: Lund University Library
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 301ed1567b78956b7d6ec9ef2378e37f87ca1371)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/SearchEngine/Elasticsearch/Search.pm