Bugzilla – Attachment 91563 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), 2.00 KB, created by
Nick Clemens
on 2019-07-16 18:44:28 UTC
(
hide
)
Description:
Bug 22524: Fix date/time-last-modified search with Elasticsearch
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2019-07-16 18:44:28 UTC
Size:
2.00 KB
patch
obsolete
>From c99550da045242d413bc1ac2bf639585a32b96ee 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> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.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 cde124940b..5c4eb62463 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -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', >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