Bug 22892

Summary: Warning when reindexing without parameters
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Searching - ElasticsearchAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: jonathan.druart, martin.renvoize, nick
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:
19.05.00
Bug Depends on: 21872    
Bug Blocks:    
Attachments: Bug 22892: Remove warning from rebuild_es if --processes not passed
Bug 22892: Remove warning from rebuild_es if --processes not passed

Description Katrin Fischer 2019-05-11 12:02:56 UTC
There is a warning, when rebuilding the elastic search index without giving any parameters:

Use of uninitialized value $processes in numeric lt (<) at ./misc/search_tools/rebuild_elasticsearch.pl line 199.
Comment 1 Jonathan Druart 2019-05-13 00:49:35 UTC
Created attachment 89646 [details] [review]
Bug 22892: Remove warning from rebuild_es if --processes not passed

Use of uninitialized value $processes in numeric lt (<) at
misc/search_tools/rebuild_elasticsearch.pl line 199.

We want the number of processes to be set to 1 by default, and then
assign it to $slice_count

Test plan:
Run the script with and without --processes and confirm that the warning
went away.
Comment 2 Katrin Fischer 2019-05-13 21:47:18 UTC
Created attachment 89721 [details] [review]
Bug 22892: Remove warning from rebuild_es if --processes not passed

Use of uninitialized value $processes in numeric lt (<) at
misc/search_tools/rebuild_elasticsearch.pl line 199.

We want the number of processes to be set to 1 by default, and then
assign it to $slice_count

Test plan:
Run the script with and without --processes and confirm that the warning
went away.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Katrin Fischer 2019-05-13 21:47:39 UTC
Trivial fix - going straight to PQA.
Comment 4 Nick Clemens 2019-05-15 12:18:47 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-05-30 19:10:41 UTC
Bug with enhancement not in 18.11.x series.