Bug 22524: Fix date/time-last-modified search with Elasticsearch

Avoid using slash in the field name since it would need to be escaped. Fix conversion of dtlm and any existing mapping.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Ere Maijala 2019-04-29 11:03:22 +03:00 committed by Martin Renvoize
parent 2293e6597c
commit 5d27fb71cb
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 9 additions and 1 deletions

View File

@ -546,7 +546,7 @@ our %index_field_convert = (
'pubdate' => 'date-of-publication',
'acqdate' => 'date-of-acquisition',
'date/time-last-modified' => 'date-time-last-modified',
'dtlm' => 'date/time-last-modified',
'dtlm' => 'date-time-last-modified',
'diss' => 'dissertation-information',
'nb' => 'isbn',
'ns' => 'issn',

View File

@ -0,0 +1,8 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "UPDATE `search_field` SET `name` = 'date-time-last-modified', `label` = 'date-time-last-modified' WHERE `name` = 'date/time-last-modified'" );
# Always end with this (adjust the bug info)
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 22524 - Fix date/time-last-modified search with Elasticsearch)\n";
}