Bugzilla – Attachment 110615 Details for
Bug 25265
Elasticsearch - Batch editing items on a biblio can lead to incorrect index
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25265: (follow-up) Don't index malformed records
Bug-25265-follow-up-Dont-index-malformed-records.patch (text/plain), 1.64 KB, created by
Nick Clemens (kidclamp)
on 2020-09-23 18:58:45 UTC
(
hide
)
Description:
Bug 25265: (follow-up) Don't index malformed records
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-23 18:58:45 UTC
Size:
1.64 KB
patch
obsolete
>From 4a2d8110cd3fea214f421c6fc677ec9063bb9dde Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 23 Sep 2020 18:57:26 +0000 >Subject: [PATCH] Bug 25265: (follow-up) Don't index malformed records > >This is analogous to 26522, we shoudl skip record that cannot be retrieved for indexing >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index 49437cd268..dab246f7c1 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -300,15 +300,19 @@ sub index_records { > $biblionumbers = [$biblionumbers] if ref $biblionumbers ne 'ARRAY' && defined $biblionumbers; > $records = [$records] if ref $records ne 'ARRAY' && defined $records; > if ( $op eq 'specialUpdate' ) { >+ my $index_biblionumbers; > unless ($records) { > foreach my $biblionumber ( @$biblionumbers ){ > my $record = C4::Biblio::GetMarcBiblio({ > biblionumber => $biblionumber, > embed_items => 1 }); >- push @$records, $record; >+ if( $record ){ >+ push @$records, $record; >+ push @$index_biblionumbers, $biblionumber; >+ } > } > } >- $self->update_index_background( $biblionumbers, $records ); >+ $self->update_index_background( $index_biblionumbers, $records ); > } > elsif ( $op eq 'recordDelete' ) { > $self->delete_index_background( $biblionumbers ); >-- >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 25265
:
107832
|
107855
|
107867
|
109538
|
109556
|
110262
|
110263
|
110264
|
110380
|
110381
|
110382
|
110457
|
110458
|
110459
|
110560
|
110561
|
110562
|
110565
|
110594
|
110595
|
110596
|
110597
|
110615
|
110618
|
110729
|
110730
|
110731
|
110732
|
110733
|
110734
|
110736
|
110737
|
110882
|
110883
|
110937