Bug 33626

Summary: compare_es_to_db.pl does not work with Search::Elasticsearch 7.0
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: danyonsewell, jonathan.druart, lucas, robin
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06,22.05.14
Circulation function:
Bug Depends on:    
Bug Blocks: 25439    
Attachments: Bug 33626: Remove invalid params
Bug 33626: Remove invalid params

Description Nick Clemens (kidclamp) 2023-04-27 11:22:47 UTC
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
Comment 1 Nick Clemens (kidclamp) 2023-04-27 11:27:15 UTC
Created attachment 150289 [details] [review]
Bug 33626: Remove invalid params

This patch reformats the params passed to scroll_helper as defined here:
https://metacpan.org/pod/Search::Elasticsearch::Client::7_0::Scroll

To test:
1 - perl misc/maintenance/compare_es_to_db.pl
2 - It dies:
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
3 - Apply patch
4 - Repeat
5 - It succeeds!
Comment 2 Jonathan Druart 2023-05-04 10:37:16 UTC
Created attachment 150640 [details] [review]
Bug 33626: Remove invalid params

This patch reformats the params passed to scroll_helper as defined here:
https://metacpan.org/pod/Search::Elasticsearch::Client::7_0::Scroll

To test:
1 - perl misc/maintenance/compare_es_to_db.pl
2 - It dies:
[Param] ** Unknown param (scroll_in_qs) in (search) request. , called from sub Search::Elasticsearch::Client::7_0::Direct::scroll_helper at misc/maintenance/compare_es_to_db.pl line 55.
3 - Apply patch
4 - Repeat
5 - It succeeds!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Tomás Cohen Arazi (tcohen) 2023-05-05 13:15:44 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 4 Martin Renvoize (ashimema) 2023-05-12 15:12:44 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 5 Lucas Gass (lukeg) 2023-06-13 16:05:24 UTC
Backported to 22.05.x for upcoming 22.05.14
Comment 6 Danyon Sewell 2023-07-20 00:16:58 UTC
Not backporting to 21.11.x