diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 49474ecb19..946c5eb393 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -304,8 +304,8 @@ How many results to skip from the start of the results. =item C<$max_results> -The max number of results to return. The default is 100 (because unlimited -is a pretty terrible thing to do.) +The max number of results to return. +The default is the result of method max_result_window(). =item C<%options> @@ -343,7 +343,7 @@ sub simple_search_compat { my %options; $offset = 0 if not defined $offset or $offset < 0; $options{offset} = $offset; - $max_results //= 100; + $max_results //= $self->max_result_window; unless (ref $query) { # We'll push it through the query builder to sanitise everything.