Bugzilla – Attachment 94913 Details for
Bug 23719
Record matching for authorities using defined fields is broken under ES
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23719: (follow-up) Add warn when passed invalid search field in marclist
Bug-23719-follow-up-Add-warn-when-passed-invalid-s.patch (text/plain), 1.43 KB, created by
Nick Clemens (kidclamp)
on 2019-10-31 14:35:18 UTC
(
hide
)
Description:
Bug 23719: (follow-up) Add warn when passed invalid search field in marclist
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-10-31 14:35:18 UTC
Size:
1.43 KB
patch
obsolete
>From 0881034329a063a33be1b9716fce6bf3f4522e45 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 31 Oct 2019 14:34:53 +0000 >Subject: [PATCH] Bug 23719: (follow-up) Add warn when passed invalid search > field in marclist > >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 5fbd283d3a..ddcc6fcb07 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -495,6 +495,7 @@ sub build_authorities_query_compat { > # This turns the old-style many-options argument form into a more > # extensible hash form that is understood by L<build_authorities_query>. > my @searches; >+ my $mappings = $self->get_elasticsearch_mappings(); > > # Convert to lower case > $marclist = [map(lc, @{$marclist})]; >@@ -503,7 +504,9 @@ sub build_authorities_query_compat { > my @indexes; > # Make sure everything exists > foreach my $m (@$marclist) { >+ > push @indexes, exists $koha_to_index_name->{$m} ? $koha_to_index_name->{$m} : $m; >+ warn "Unknown search field $m in marclist" unless defined $mappings->{properties}->{data}->{$m}; > } > for ( my $i = 0 ; $i < @$value ; $i++ ) { > next unless $value->[$i]; #clean empty form values, ES doesn't like undefined searches >-- >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 23719
:
93414
|
94680
|
94913
|
95001
|
95090
|
95091
|
99714