Bug 23670 - Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch
Summary: Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Nicolas Legrand
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on:
Blocks: 23671
  Show dependency treegraph
 
Reported: 2019-09-23 16:27 UTC by Nicolas Legrand
Modified: 2021-06-14 21:29 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00


Attachments
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch (1.28 KB, patch)
2019-09-23 16:37 UTC, Nicolas Legrand
Details | Diff | Splinter Review
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch (1.43 KB, patch)
2019-10-01 12:30 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch (1.49 KB, patch)
2019-10-04 09:59 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Legrand 2019-09-23 16:27:11 UTC
When your mapping includes an Invalid MARC field expression, it tries to throw an exception with Koha::Exceptions::Elasticsearch::MARCFieldExprParseError. But since Koha::Exceptions::Elasticsearch isn't loaded in Koha::SearchEngine::Elasticsearch, it dies like this:

Can't locate Koha/Exceptions/Elasticsearch/MARCFieldExprParseError.pm in @INC (you may need to install the Koha::Exceptions::Elasticsearch::MARCFieldExprParseError module)
Comment 1 Nicolas Legrand 2019-09-23 16:37:07 UTC
Created attachment 93132 [details] [review]
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch

Prevent Koha::SearchEngine::Elasticsearch from dying when trying to run
Koha::Exceptions::Elasticsearch::MARCFieldExprParseError->throw()

Plan test:

1. Go to Administration -> Searchengine configuration, and add a mapping
   for 995Z, whatever the search field (I did it with local-classification),
   save
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it die asking for Koha::Exceptions::Elasticsearch
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. see it throw: Invalid MARC field expression: 995Z
Comment 2 Séverine Queune 2019-10-01 12:30:03 UTC
Created attachment 93361 [details] [review]
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch

Prevent Koha::SearchEngine::Elasticsearch from dying when trying to run
Koha::Exceptions::Elasticsearch::MARCFieldExprParseError->throw()

Plan test:

1. Go to Administration -> Searchengine configuration, and add a mapping
   for 995Z, whatever the search field (I did it with local-classification),
   save
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it die asking for Koha::Exceptions::Elasticsearch
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. see it throw: Invalid MARC field expression: 995Z

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 3 Katrin Fischer 2019-10-03 12:01:35 UTC
Nicolas, please remember to add youself as Assignee on your bugs :)
Comment 4 Nick Clemens (kidclamp) 2019-10-04 09:59:10 UTC
Created attachment 93727 [details] [review]
Bug 23670 Load Koha::Exceptions::ElasticSearch module in Koha::SearchEngine::Elasticsearch

Prevent Koha::SearchEngine::Elasticsearch from dying when trying to run
Koha::Exceptions::Elasticsearch::MARCFieldExprParseError->throw()

Plan test:

1. Go to Administration -> Searchengine configuration, and add a mapping
   for 995Z, whatever the search field (I did it with local-classification),
   save
2. run $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
3. see it die asking for Koha::Exceptions::Elasticsearch
4. apply patch
5. rerun $KOHA_PATH/misc/search_tools/rebuild_elasticsearch.pl -v -d -b
6. see it throw: Invalid MARC field expression: 995Z

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Martin Renvoize 2019-10-07 11:58:26 UTC
Nice work!

Pushed to master for 19.11.00