Bug 29077: Remove blank indexes before convert

To test:
1 - Be using Elasticsearch
2 - Search on OPAC with dropdown set to 'Library catalog'
3 - Warns in plack-opac-error.log
4 - Apply patch
5 - Repeat
6 - No warns
7 - Search returns correct results

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2021-09-22 12:55:19 +00:00 committed by Fridolin Somers
parent 0ba9d95098
commit 8bb51dccb0
1 changed files with 2 additions and 0 deletions

View File

@ -714,6 +714,8 @@ sub _convert_index_fields {
my %index_type_convert =
( __default => undef, phr => 'phrase', rtrn => 'right-truncate', 'st-year' => 'st-year' );
@indexes = grep(/.+/, @indexes); # Remove any blank indexes, i.e. keyword
# Convert according to our table, drop anything that doesn't convert.
# If a field starts with mc- we save it as it's used (and removed) later
# when joining things, to indicate we make it an 'OR' join.