Bugzilla – Attachment 110614 Details for
Bug 26522
Elasticsearch - don't attempt to index record if it cannot be retrieved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26522: Don't index record if no record is retrieved
Bug-26522-Dont-index-record-if-no-record-is-retrie.patch (text/plain), 1.58 KB, created by
Nick Clemens (kidclamp)
on 2020-09-23 18:52:22 UTC
(
hide
)
Description:
Bug 26522: Don't index record if no record is retrieved
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-23 18:52:22 UTC
Size:
1.58 KB
patch
obsolete
>From 4611415fe62990118e75f38500c10d6300173c20 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 23 Sep 2020 17:58:00 +0000 >Subject: [PATCH] Bug 26522: Don't index record if no record is retrieved > >Currently if we cannot load the marc record, we die. This patch simply skips >the malformed record during indexing > >Eventually we should warn or pass back an exception, but we can use >compare_es_to_db.pl to identify problematic records and should fix this >issue to prevent import from dying > >To test: >1 - Export or create a bib with malformed data > In sample data search for 'udgave' the record has > 942 _6_ >2 - Set System preference SearchEngine to Elasticsearch >3 - Import the record >4 - Import fails >5 - Check intranet-error.log, see warning about calling leader on undefined value >6 - Apply patch >7 - Import again >8 - Success, import succeeds >9 - Search for 'udgave' or term that returns your record >10 - The record should not be findable >--- > C4/Biblio.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 46fb544a9c..c02215393a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2525,7 +2525,7 @@ sub ModZebra { > biblionumber => $biblionumber, > embed_items => 1 }); > } >- $indexer->update_index_background( [$biblionumber], [$record] ); >+ $indexer->update_index_background( [$biblionumber], [$record] ) if $record; > } > elsif ( $op eq 'recordDelete' ) { > $indexer->delete_index_background( [$biblionumber] ); >-- >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 26522
: 110614