Bugzilla – Attachment 107151 Details for
Bug 25955
compare_es_to_db.pl broken by drop of Catmandu dependency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25955: Fix getting index_name
Bug-25955-Fix-getting-indexname.patch (text/plain), 2.08 KB, created by
Martin Renvoize (ashimema)
on 2020-07-21 14:14:06 UTC
(
hide
)
Description:
Bug 25955: Fix getting index_name
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-07-21 14:14:06 UTC
Size:
2.08 KB
patch
obsolete
>From 1b31a2428f8067f69e0fbb7caf693910ab44c9b5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 8 Jul 2020 14:24:37 +0000 >Subject: [PATCH] Bug 25955: Fix getting index_name > >To test: >1 - Have a site running ES >2 - perl misc/maintenance/compare_es_to_db.pl >3 - Lots of output, all bad >4 - Apply patch >5 - Repeate >6 - Whew, looks correct > >Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > misc/maintenance/compare_es_to_db.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/maintenance/compare_es_to_db.pl b/misc/maintenance/compare_es_to_db.pl >index 057ec30ae6..6eaea29799 100644 >--- a/misc/maintenance/compare_es_to_db.pl >+++ b/misc/maintenance/compare_es_to_db.pl >@@ -46,14 +46,14 @@ foreach my $index ( ('biblios','authorities') ){ > > my $searcher = Koha::SearchEngine::Elasticsearch->new({ index => $index }); > my $es = $searcher->get_elasticsearch(); >- my $count = $es->indices->stats( index => $searcher->get_elasticsearch_params->{index_name} ) >+ my $count = $es->indices->stats( index => $searcher->index_name ) > ->{_all}{primaries}{docs}{count}; > print "Count in db for $index is " . scalar @db_records . ", count in Elasticsearch is $count\n"; > > # Now we get all the ids from Elasticsearch > # The scroll lets us iterate through, it fetches chunks of 'size' as we move through > my $scroll = $es->scroll_helper( >- index => $searcher->get_elasticsearch_params->{index_name}, >+ index => $searcher->index_name, > size => 5000, > body => { > query => { >@@ -79,7 +79,7 @@ foreach my $index ( ('biblios','authorities') ){ > > # Fetch values for providing record links > my $es_params = $searcher->get_elasticsearch_params; >- my $es_base = "$es_params->{nodes}[0]/$es_params->{index_name}"; >+ my $es_base = "$es_params->{nodes}[0]/".$searcher->index_name; > my $opac_base = C4::Context->preference('OPACBaseURL'); > > print "\nComparing arrays, this may take a while\n"; >-- >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 25955
:
106658
|
106869
| 107151