From c3576b1adedc4dbcabb1eb833f33194f66db63bf Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 25 Jun 2018 14:14:43 +0200 Subject: [PATCH] Bug 19502: Add POD for max_result_window Signed-off-by: Nick Clemens Signed-off-by: Alex Arnaud Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- Koha/SearchEngine/Elasticsearch/Search.pm | 9 +++++++++ Koha/SearchEngine/Zebra/Search.pm | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 6b2f2a926a..a1598d795c 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -399,6 +399,15 @@ sub json2marc { return $marc; } +=head2 max_result_window + +Returns the maximum number of results that can be fetched + +This directly requests Elasticsearch for the setting index.max_result_window (or +the default value for this setting in case it is not set) + +=cut + sub max_result_window { my ($self) = @_; diff --git a/Koha/SearchEngine/Zebra/Search.pm b/Koha/SearchEngine/Zebra/Search.pm index 45c050cfed..576b9f59c2 100644 --- a/Koha/SearchEngine/Zebra/Search.pm +++ b/Koha/SearchEngine/Zebra/Search.pm @@ -110,6 +110,14 @@ sub search_auth_compat { C4::AuthoritiesMarc::SearchAuthorities(@params); } +=head2 max_result_window + +Returns the maximum number of results that can be fetched + +Zebra does not have such a limit, so it always returns undef + +=cut + sub max_result_window { undef } 1; -- 2.39.5