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)
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
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>
Nicolas, please remember to add youself as Assignee on your bugs :)
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>
Nice work! Pushed to master for 19.11.00