Bugzilla – Attachment 114702 Details for
Bug 27307
"Keyword as phrase" option in search dropdown doesn't work with Elastic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27307: Don't drop phrase directive when searching keyword index
Bug-27307-Dont-drop-phrase-directive-when-searchin.patch (text/plain), 1.51 KB, created by
Andrew Fuerste-Henry
on 2020-12-24 15:33:34 UTC
(
hide
)
Description:
Bug 27307: Don't drop phrase directive when searching keyword index
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-12-24 15:33:34 UTC
Size:
1.51 KB
patch
obsolete
>From e57ff7ed5072958033a1da206c62325fa57f0a43 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 24 Dec 2020 14:04:55 +0000 >Subject: [PATCH] Bug 27307: Don't drop phrase directive when searching keyword > index > >We convert 'keyword' to '' as an index since we want it to search all fields > >When we are searching 'as phrase', however, we should not drop the search type > >To test: > 1 - Enable IntranetCatalogPullDown > 2 - Set searchEngine to Elasticsearch > 3 - Perform a search for 'Keyword as phrase' for a phrase that does appear in a record > 4 - You get the result > 5 - Reverse the order of words in the phrase > 6 - You still get a result? > 7 - Apply patch > 8 - Restart all the things > 9 - Reversed search does not return record >10 - Correct order and search, correct record returned > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index e00fc5a523..c834a75086 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -732,7 +732,7 @@ sub _convert_index_fields { > type => $index_type_convert{ $t // '__default' } > }; > $r->{field} = ($mc . $r->{field}) if $mc && $r->{field}; >- $r->{field} ? $r : undef; >+ $r->{field} || $r->{type} ? $r : undef; > } @indexes; > } > >-- >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 27307
:
114699
|
114700
|
114701
|
114702
|
115077
|
115078