Bugzilla – Attachment 104108 Details for
Bug 25342
Scripts not running under plack can cause duplication of ES records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25342: Force ES id as string
Bug-25342-Force-ES-id-as-string.patch (text/plain), 2.01 KB, created by
Nick Clemens (kidclamp)
on 2020-05-01 14:55:09 UTC
(
hide
)
Description:
Bug 25342: Force ES id as string
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-05-01 14:55:09 UTC
Size:
2.01 KB
patch
obsolete
>From 5e0b62958d58f9df590b2ae1c384e20e7035fd22 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 1 May 2020 14:48:55 +0000 >Subject: [PATCH] Bug 25342: Force ES id as string > >To test: >1 - Be using ES >2 - Find a unique record by searchign for title or seomthing >3 - Edit the record >4 - Repeat search and confirm you are returned to the details page >5 - Go to Tools->MARC modification templates >6 - Add a template and define an action >7 - Go to Tools->Batch record modification >8 - Select Enter a list of record numbers >9 - Enter the biblionumber of the record you searched for >10 - Use the marc modification template you setup >11 - Complete the modification >12 - Repeat your search >13 - note you get two results, both pointing to same biblionumber >14 - Check the ES index, note that you have two entries, one with the biblionumber, and the other with #.0, e.g.: > curl -XGET 'es:9200/koha_kohadev_biblios/data/14.0?pretty' > curl -XGET 'es:9200/koha_kohadev_biblios/data/14?pretty' >15 - Apply patch >16 - Delete and rebuild ES index > perl misc/search_tools/rebuild_elasticsearch.pl -d -b >17 - Repeat 2-12 >18 - No duplication this time >--- > Koha/SearchEngine/Elasticsearch/Indexer.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm >index bf00dda1d8..4c57445262 100644 >--- a/Koha/SearchEngine/Elasticsearch/Indexer.pm >+++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm >@@ -101,7 +101,6 @@ Arrayref of C<MARC::Record>s. > > sub update_index { > my ($self, $biblionums, $records) = @_; >- > my $conf = $self->get_elasticsearch_params(); > my $elasticsearch = $self->get_elasticsearch(); > my $documents = $self->marc_records_to_documents($records); >@@ -112,7 +111,7 @@ sub update_index { > my $document = $documents->[$i]; > push @body, { > index => { >- _id => $id >+ _id => "$id" > } > }; > push @body, $document; >-- >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 25342
:
104108
|
104175
|
104509
|
104685
|
104686