]> git.koha-community.org Git - koha.git/commit
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)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Apr 2022 14:41:05 +0000 (10:41 -0400)
commit301ed1567b78956b7d6ec9ef2378e37f87ca1371
treec2496edb8aaf4be3ef0549e0697cd3a3581478ee
parentae426e448669bafdb8697b5b243b82017eebac11
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>
Koha/SearchEngine/Elasticsearch/Search.pm
cpanfile