Bug 20261 - No result in some page in authority search opac and pro (ES)
Summary: No result in some page in authority search opac and pro (ES)
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Alex Arnaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 17373
Blocks: 21405
  Show dependency treegraph
 
Reported: 2018-02-21 10:33 UTC by claire.hernandez@biblibre.com
Modified: 2018-10-24 09:13 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20261 - Fix pagination of the results in authority search (1.46 KB, patch)
2018-03-28 09:06 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 20261 - Fix pagination of the results in authority search (1.52 KB, patch)
2018-03-28 12:22 UTC, Nicolas Legrand
Details | Diff | Splinter Review
Bug 20261 - Fix pagination of the results in authority search (1.58 KB, patch)
2018-03-30 11:39 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description claire.hernandez@biblibre.com 2018-02-21 10:33:32 UTC
How I reproduce this issue:

* apply bug 17373 (auth unimarc mapping)
* mappings.pl?op=reset&i_know_what_i_am_doing=1
* reindex autorities - ex: rebuild -a -v -d
* authority search in opac or pro, looking for a term used
* page 1 =>  OK, I see results
* clic on page 2 => OK, I see results
* clic on page 3 => KO, no result
* clic on the lasty page displayed => KO (another), with an error

==> error.log <==
[Wed Feb 21 10:30:11 2018] authorities-home.pl: [Request] ** [http://elastic:80]-[500] {"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10020]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"koha_maedi_authorities","node":"hhR2RjsnSye_jPUnySnMkQ","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [10020]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}]},"status":500}, called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/share/perl5/Catmandu/Store/ElasticSearch/Bag.pm line 167. With vars: {'status_code' => 500,'request' => {'method' => 'GET','path' => '/koha_maedi_authorities/data/_search','serialize' => 'std','body' => {'size' => 20,'from' => 10000,'sort' => [{'Heading__sort.phrase' => 'asc'}],'query' => {'bool' => {'should' => [{'match' => {'Heading-Main' => 'de'}}]}}},'qs' => {},'mime_type' => 'application/json','ignore' => []}}
[Wed Feb 21 10:30:11 2018] authorities-home.pl: Unable to perform your search. Please try again.

I don't know if it is a mapping problem or a page management issue in authority search. To be investigated.
Comment 1 Alex Arnaud 2018-03-28 09:06:30 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
Comment 2 Nicolas Legrand 2018-03-28 12:22:16 UTC
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>
Comment 3 Nick Clemens 2018-03-30 11:39:16 UTC
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>
Comment 4 Jonathan Druart 2018-04-05 17:54:34 UTC
Pushed to master for 18.05, thanks to everybody involved!