Summary: | No result in some page in authority search opac and pro (ES) | ||
---|---|---|---|
Product: | Koha | Reporter: | claire.hernandez <claire.hernandez> |
Component: | Searching - Elasticsearch | Assignee: | Alex Arnaud <alex.arnaud> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P5 - low | CC: | januszop, jonathan.druart, martin.renvoize, nick, nicolas.legrand, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 17373 | ||
Bug Blocks: | 21405 | ||
Attachments: |
Bug 20261 - Fix pagination of the results in authority search
Bug 20261 - Fix pagination of the results in authority search Bug 20261 - Fix pagination of the results in authority search |
Description
claire.hernandez@biblibre.com
2018-02-21 10:33:32 UTC
Created attachment 73375 [details] [review] Bug 20261 - Fix pagination of the results in authority search Test plan: - apply this patch, - do a search that return more than 20 results, - click on page 2, - check that you get results, - check other pages if possible Created attachment 73381 [details] [review] Bug 20261 - Fix pagination of the results in authority search Test plan: - apply this patch, - do a search that return more than 20 results, - click on page 2, - check that you get results, - check other pages if possible Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Created attachment 73469 [details] [review] Bug 20261 - Fix pagination of the results in authority search Test plan: - apply this patch, - do a search that return more than 20 results, - click on page 2, - check that you get results, - check other pages if possible Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 18.05, thanks to everybody involved! Did you check the impact of the patch on zebra searches? It seems that removing the line: my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; leads to improper behavior of Koha when switching to subsequent pages of result set when zebra is used as a search engine: instead of jumping forward every 20 (or whatsoever) entries it moves forward by one entry only. (In reply to Janusz Kaczmarek from comment #5) > Did you check the impact of the patch on zebra searches? It seems that > removing the line: > > my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; > > leads to improper behavior of Koha when switching to subsequent pages of > result set when zebra is used as a search engine: instead of jumping forward > every 20 (or whatsoever) entries it moves forward by one entry only. NB. a similar line is to be found in authorities/auth_finder.pl (line 81 in 18.05.06): my $offset = $startfrom * $resultsperpage; and works OK with zebra and search_auth_compat. The difference is that the pages are counted 1-base in authorities-home.pl and 0-based in auth_finder.pl. Does this line not harm ES searches? If not why not unify the mode of operation and make authorities-home.pl 0-based with the initial phrase $offset = $startfrom * $resultsperpage ? Would it be OK for ES? (In reply to Janusz Kaczmarek from comment #6) > (In reply to Janusz Kaczmarek from comment #5) > > Did you check the impact of the patch on zebra searches? It seems that > > removing the line: > > > > my $offset = ( $startfrom - 1 ) * $resultsperpage + 1; > > > > leads to improper behavior of Koha when switching to subsequent pages of > > result set when zebra is used as a search engine: instead of jumping forward > > every 20 (or whatsoever) entries it moves forward by one entry only. > > NB. a similar line is to be found in authorities/auth_finder.pl (line 81 in > 18.05.06): > > my $offset = $startfrom * $resultsperpage; > > and works OK with zebra and search_auth_compat. > > The difference is that the pages are counted 1-base in authorities-home.pl > and 0-based in auth_finder.pl. > > Does this line not harm ES searches? If not why not unify the mode of > operation and make authorities-home.pl 0-based with the initial phrase > $offset = $startfrom * $resultsperpage ? Would it be OK for ES? See bugs 19365 and 21405 |