Bugzilla – Attachment 89153 Details for
Bug 22524
Elasticsearch - Date range in advanced search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22524: Fix date/time-last-modified search with Elasticsearch
Bug-22524-Fix-datetime-last-modified-search-with-E.patch (text/plain), 1.94 KB, created by
Liz Rea
on 2019-04-30 19:33:12 UTC
(
hide
)
Description:
Bug 22524: Fix date/time-last-modified search with Elasticsearch
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-04-30 19:33:12 UTC
Size:
1.94 KB
patch
obsolete
>From 4e4ede9740b12dd03249c7fe2cf4572fd5a2c643 Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Mon, 29 Apr 2019 11:03:22 +0300 >Subject: [PATCH] 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> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > installer/data/mysql/atomicupdate/bug_22524.perl | 8 ++++++++ > 2 files changed, 9 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_22524.perl > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index d08548f7e9..4e83cd6148 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -548,7 +548,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', >diff --git a/installer/data/mysql/atomicupdate/bug_22524.perl b/installer/data/mysql/atomicupdate/bug_22524.perl >new file mode 100644 >index 0000000000..af765f8e60 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22524.perl >@@ -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"; >+} >\ No newline at end of file >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22524
:
88063
|
88758
|
88998
|
88999
|
89000
|
89152
|
89153
|
91562
|
91563