Bugzilla – Attachment 103738 Details for
Bug 25229
Elasticsearch should use the authid (record id) rather than the 001 when returning auth search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25229: Return authid of record rather than 001
Bug-25229-Return-authid-of-record-rather-than-001.patch (text/plain), 1.47 KB, created by
Frédéric Demians
on 2020-04-27 07:32:41 UTC
(
hide
)
Description:
Bug 25229: Return authid of record rather than 001
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2020-04-27 07:32:41 UTC
Size:
1.47 KB
patch
obsolete
>From 7ea4fde27bc801af0523b1243e20e03f2f0b3162 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 21 Apr 2020 13:47:59 +0000 >Subject: [PATCH] Bug 25229: Return authid of record rather than 001 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >Document _id field, in authorities ES index, is always authid >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index a5b410e3a6..0bc8c3ebc6 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -207,12 +207,10 @@ sub search_auth_compat { > my $record = $es_record->{'_source'}; > my %result; > >- # I wonder if these should be real values defined in the mapping >- # rather than hard-coded conversions. >- #my $record = $_[0]; >- # Handle legacy nested arrays indexed with splitting enabled. >- my $authid = $record->{ 'local-number' }[0]; >- $authid = @$authid[0] if (ref $authid eq 'ARRAY'); >+ # We are using the authid to create links, we should honor the authid as stored in the db, not >+ # the 001 which, in some circumstances, can contain other data >+ my $authid = $es_record->{_id}; >+ > > $result{authid} = $authid; > >-- >2.17.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 25229
:
103376
|
103738
|
103759
|
103760
|
103761
|
103779
|
103780
|
103781