Bugzilla – Attachment 96623 Details for
Bug 24109
Elasticsearch - Advanced search limit by shelving location is not converted to correct index
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24109: Map 'loc' to 'location' whne building ES queries
Bug-24109-Map-loc-to-location-whne-building-ES-que.patch (text/plain), 1.46 KB, created by
Nick Clemens (kidclamp)
on 2019-12-24 14:47:15 UTC
(
hide
)
Description:
Bug 24109: Map 'loc' to 'location' whne building ES queries
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-12-24 14:47:15 UTC
Size:
1.46 KB
patch
obsolete
>From 3a0f05695f931a7dc86d6252c3a396988f1ba3e7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 24 Dec 2019 14:42:36 +0000 >Subject: [PATCH] Bug 24109: Map 'loc' to 'location' whne building ES queries > >When building the query we start with mc-loc - then we strip the mc, convert the field, and restore mc- >to indicate the searches should be ORed together. > >We have a mapping for mc-loc to location, but we strip the mc for converting > >For all other mc indexes there is no issue as they don't need to be mapped (they are the same minus the mc) > >To test: >0 - Be using Elasticsearch and have AdvancedSearchTypes set to include loc >1 - Perform an advanced search for two shelving locations that have items in the catalog >2 - Note no restuls >3 - Apply patch >4 - Restart all the things >5 - Repeat search >6 - You get results! >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 05804e3640..3ab8deb0c7 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -703,6 +703,7 @@ our %index_field_convert = ( > 'hi' => 'host-item-number', > 'itu' => 'index-term-uncontrolled', > 'itg' => 'index-term-genre', >+ 'loc' => 'location' > ); > my $field_name_pattern = '[\w\-]+'; > my $multi_field_pattern = "(?:\\.$field_name_pattern)*"; >-- >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 24109
:
96623
|
96628