]> git.koha-community.org Git - koha.git/commit
Bug 19502: Retrieve index.max_result_window from ES
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 5 Jun 2018 13:11:34 +0000 (15:11 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 30 Jul 2018 12:14:25 +0000 (14:14 +0200)
commit732374eb9a21ec013366462545f4ab66271c7e8c
tree6a6af7b1dd21bf9561dfe20073258284de310c2d
parent78502222852e6ff5ed3c5cce433f2e87de193358
Bug 19502: Retrieve index.max_result_window from ES

This avoid hardcoding '10000' in two different places and allow users to
adjust this setting.

Also, this patch fixes a bug when the search return less than 10000
results

Test plan:
1. Do a search that returns 10000+ records.
2. Note the warning above the pagination buttons
3. Go to the last page, no error
4. Change the ES setting:
   curl -XPUT http://elasticsearch/koha_master_biblios/_settings -d \
     '{"index": {"max_result_window": 20000}}'
5. Do another search that returns more than 10000 but less than 20000
6. Note that the warning does not show up
7. Go to the last page, still no error

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 619d693908b1eb5de3da0d1bb80cc6c3cbf51ab3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/SearchEngine/Elasticsearch/Search.pm
Koha/SearchEngine/Zebra/Search.pm
catalogue/search.pl
opac/opac-search.pl
t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t