Bugzilla – Attachment 105744 Details for
Bug 24555
POC Elasticsearch - Use boolean queries instead of full text queries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24555: Fix searches like 'field-name:term'
Bug-24555-Fix-searches-like-field-nameterm.patch (text/plain), 1.03 KB, created by
Julian Maurice
on 2020-06-11 12:37:20 UTC
(
hide
)
Description:
Bug 24555: Fix searches like 'field-name:term'
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-06-11 12:37:20 UTC
Size:
1.03 KB
patch
obsolete
>From bcd0f42604f8084c76cefeee7236ad637bec7f23 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 11 Jun 2020 16:34:04 +0400 >Subject: [PATCH] Bug 24555: Fix searches like 'field-name:term' > >This is used for instance in Koha::Authorities::get_usage_count >("an:<authid>") >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 1a092d8b07..8cbb656c53 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -273,6 +273,12 @@ sub _create_match_expression { > my ($self, $search_param) = @_; > > my $expression = {}; >+ >+ if ($search_param->{operand} =~ /([\w\-]+):(.+)/) { >+ $search_param->{field} = $1; >+ $search_param->{operand} = $2; >+ } >+ > unless (defined($search_param->{field})) { > $expression->{multi_match} = { > type => 'cross_fields', >-- >2.20.1
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 24555
:
98242
|
98243
|
98247
|
98248
|
104419
|
104422
|
105061
|
105470
|
105471
|
105472
| 105744