Bug 30844: The OPAC detail page's browser is limited to the current page of results when using Elasticsearch
When viewing the detail page of the first or last record of a result page, it's not possible to browse to another page when using Elasticsearch. To test: 1) Search for "*" in the OPAC 2) Click on the last result of the page 3) Observe that you cannot browse to the next page 4) Apply the patch 5) Search for "*" in the OPAC 6) Click on the last result of the page 7) Observe that you can browse to the next page 8) Sign off Sponsored-by: Lund University Library Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
637c580663
commit
71f54a7571
|
|
@ -86,6 +86,7 @@ use Koha::Reviews;
|
|||
use Koha::SearchEngine::Search;
|
||||
use Koha::SearchEngine::QueryBuilder;
|
||||
|
||||
use JSON qw( decode_json );
|
||||
|
||||
my $query = CGI->new();
|
||||
|
||||
|
|
@ -247,7 +248,9 @@ if ($session->param('busc')) {
|
|||
$sort_by[0] = $default_sort_by if !$sort_by[0] && defined($default_sort_by);
|
||||
my ($error, $results_hashref, $facets);
|
||||
eval {
|
||||
($error, $results_hashref, $facets) = getRecords($arrParamsBusc->{'query'},$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'});
|
||||
my $searcher = Koha::SearchEngine::Search->new(
|
||||
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } );
|
||||
($error, $results_hashref, $facets) = $searcher->search_compat(decode_json($arrParamsBusc->{'query'}),$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'});
|
||||
};
|
||||
my $hits;
|
||||
my @newresults;
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ if ($tag) {
|
|||
# displays search results which should be hidden.
|
||||
# FIXME: No facets for tags search.
|
||||
} else {
|
||||
$pasarParams .= '&query=' . uri_escape_utf8($query);
|
||||
$pasarParams .= '&query=' . uri_escape_utf8(encode_json($query));
|
||||
$pasarParams .= '&count=' . uri_escape_utf8($results_per_page);
|
||||
$pasarParams .= '&simple_query=' . uri_escape_utf8($simple_query);
|
||||
$pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue