Bugzilla – Attachment 113665 Details for
Bug 26903
Authority records not being indexed in Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26903: Pass record ids and records through to update_index when passed to index_records
Bug-26903-Pass-record-ids-and-records-through-to-u.patch (text/plain), 2.04 KB, created by
Martin Renvoize (ashimema)
on 2020-11-16 13:35:43 UTC
(
hide
)
Description:
Bug 26903: Pass record ids and records through to update_index when passed to index_records
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-11-16 13:35:43 UTC
Size:
2.04 KB
patch
obsolete
>From 20abe1f136cc6e63a6c39a6064307de43a72fe66 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 13 Nov 2020 16:33:40 +0000 >Subject: [PATCH] Bug 26903: Pass record ids and records through to > update_index when passed to index_records > >When both a record and record_id are passed to index_records the data should be passed through >to update_index. We missed copying over the record ids to the variable we use as a check. > >To test: >1 - Set searchEngine system preference to Elasticsearch >2 - Reindex your db >3 - Search authorities >4 - Edit a record and add 'testwaffle' to the main heading >5 - Search authorities for 'testwaffle' - no results >6 - Apply patch >7 - Edit the record again, change 'testwaffle' to 'testpancake' >8 - Search authorities for 'testpancake' - result! >9 - Confirm imported authorities and authorities added via Z39 are correctly indexed > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index 38946d2843..e5f6474fb3 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -101,7 +101,6 @@ sub update_index { > > my $documents = $self->marc_records_to_documents($records); > my @body; >- > for (my $i = 0; $i < scalar @$biblionums; $i++) { > my $id = $biblionums->[$i]; > my $document = $documents->[$i]; >@@ -302,7 +301,9 @@ sub index_records { > $records = [$records] if ref $records ne 'ARRAY' && defined $records; > if ( $op eq 'specialUpdate' ) { > my $index_record_numbers; >- unless ($records) { >+ if ($records){ >+ $index_record_numbers = $record_numbers; >+ } else { > foreach my $record_number ( @$record_numbers ){ > my $record = _get_record( $record_number, $server ); > if( $record ){ >-- >2.20.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 26903
:
113613
|
113614
|
113644
|
113645
|
113664
| 113665 |
114299