Bugzilla – Attachment 113911 Details for
Bug 27070
Elasticsearch - with Elasticsearch 6 searches failing unless all terms are in the same field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27070: Add cross_fields type to our searches
Bug-27070-Add-crossfields-type-to-our-searches.patch (text/plain), 1.45 KB, created by
Victor Grousset/tuxayo
on 2020-11-21 18:59:43 UTC
(
hide
)
Description:
Bug 27070: Add cross_fields type to our searches
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2020-11-21 18:59:43 UTC
Size:
1.45 KB
patch
obsolete
>From 8cfd70abedd798c7cf9cbc5b53c7cc48ee3da703 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 20 Nov 2020 19:11:10 +0000 >Subject: [PATCH] Bug 27070: Add cross_fields type to our searches > >This patch adds the 'cross_fields' type to our searches: >https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-query-string-query.html#query-string-syntax > >Without this patch the search terms seem to all require being in the same field when using Elasticsearch 6 > >To test: >0 - Set QueryAutoTruncate to 'only if * is added' >1 - Find a record with a title and publisher >2 - Search for a word form the title and confirm the record is returned >3 - Search for a work from the title and the publisher's name >4 - The record is not returned >5 - Apply patch >6 - Repeat #3 >7 - The record is returned > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > 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 a087b19789..e00fc5a523 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -100,6 +100,7 @@ sub build_query { > fields => $fields, > lenient => JSON::true, > analyze_wildcard => JSON::true, >+ type => 'cross_fields', > } > }; > >-- >2.29.2
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 27070
:
113902
|
113903
|
113907
|
113908
|
113911
|
113976