Bugzilla – Attachment 64431 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 - Advanced editor - Rancor - searching broken
Bug-18822---Advanced-editor---Rancor---searching-b.patch (text/plain), 1.20 KB, created by
Nick Clemens
on 2017-06-19 15:23:15 UTC
(
hide
)
Description:
Bug 18822 - Advanced editor - Rancor - searching broken
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2017-06-19 15:23:15 UTC
Size:
1.20 KB
patch
obsolete
>From 477a404d4cab1ae03888c7193d796ee7e2a6a001 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 19 Jun 2017 11:17:14 -0400 >Subject: [PATCH] Bug 18822 - Advanced editor - Rancor - searching broken > >This patch attempt to convert records before processing as we sometimes >get XML instead of record objects. > >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 >--- > Koha/MetaSearcher.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/MetaSearcher.pm b/Koha/MetaSearcher.pm >index 65f7239..ccf50bd 100644 >--- a/Koha/MetaSearcher.pm >+++ b/Koha/MetaSearcher.pm >@@ -312,6 +312,9 @@ sub _handle_hits { > $stats->{total_fetched} += $num_fetched; > > foreach my $j ( 0..$#{ $set->{hits} } ) { >+ my $fixed_rec; >+ eval { $fixed_rec = MARC::Record::new_from_xml( $set->{hits}->[$j], 'UTF-8' ) }; >+ $set->{hits}->[$j] = $fixed_rec unless $@; > $self->handle_hit( $self->{offset} + $j, $server, $set->{hits}->[$j] ); > } > } >-- >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