Bugzilla – Attachment 75561 Details for
Bug 18822
Advanced editor - Rancor - searching broken under Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18822: Check if we have MARC::Record and convert if not when using ES
Bug-18822-Check-if-we-have-MARCRecord-and-convert-.patch (text/plain), 1.43 KB, created by
Nick Clemens
on 2018-05-25 09:38:14 UTC
(
hide
)
Description:
Bug 18822: Check if we have MARC::Record and convert if not when using ES
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-05-25 09:38:14 UTC
Size:
1.43 KB
patch
obsolete
>From 381d486285b0798fd8c9ca25f001e62ff3ff3bee Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 25 May 2018 09:32:58 +0000 >Subject: [PATCH] Bug 18822: Check if we have MARC::Record and convert if not > when using ES > >The new_record_from_zebra subroutine assumes that when using ES we >always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or >internally. This adds a test to new_from_zebra to confirm we have a >record object and to convert it if not > >To test: >1 - Perform an advanced search from the advanced editor, make sure to >select 'Local catalog' and a remote source >2 - Error 'Internal search error [Object object]' >3 - Apply patch >4 - Repeat search, success! >5 - Select and deselect various servers, search should still work >--- > C4/Search.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index f474271..4b458db 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -2507,7 +2507,7 @@ sub new_record_from_zebra { > # Set the default indexing modes > my $search_engine = C4::Context->preference("SearchEngine"); > if ($search_engine eq 'Elasticsearch') { >- return $raw_data; >+ return ref $raw_data eq 'MARC::Record' ? $raw_data : MARC::Record->new_from_xml( $raw_data, 'UTF-8' ); > } > my $index_mode = ( $server eq 'biblioserver' ) > ? C4::Context->config('zebra_bib_index_mode') // 'dom' >-- >2.1.4
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 18822
:
64431
|
64432
|
68803
|
68804
|
75561
|
76764
|
76765
|
76937
|
76938