From f72af24d1332ba08681469216903f5384670b1bf Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Thu, 14 Nov 2024 12:23:42 +0200 Subject: [PATCH] Bug 21820: Don't add records to zebraqueue table when using Elasticsearch Right now the index_records function in SearchEngine/Elasticsearch calls the index_records function from SearchEngine/Zebra, causing every items that we index for Elasticsearch to be also added to the zebraqueue table even when only Elasticsearch is in use. So this patch removes that call to prevent that from happening. To reproduce: 1. While using Elasticsearch, edit any biblio record to activate the indexer. 2. Check zebraqueue table and confirm that new record was added. 3. Apply the patch. 4. Edit a biblio record again to trigger the indexer. 5. Check that it was not added to the zebraqueue table after you applied the patch. 6. Check that the biblio was indexed correctly: go to admin->jobs and verify that a new "Update Elasticsearch index" job has been added and completed, additionally use Elasticsearch to find the biblio record you edited to confirm that it works and nothing was broken. --- Koha/SearchEngine/Elasticsearch/Indexer.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/Indexer.pm b/Koha/SearchEngine/Elasticsearch/Indexer.pm index 8a8c73f7952..0107ffecf6f 100644 --- a/Koha/SearchEngine/Elasticsearch/Indexer.pm +++ b/Koha/SearchEngine/Elasticsearch/Indexer.pm @@ -338,8 +338,6 @@ sub index_records { elsif ( $op eq 'recordDelete' ) { $self->delete_index_background( $record_numbers ); } - #FIXME Current behaviour is to index Zebra when using ES, at some point we should stop - Koha::SearchEngine::Zebra::Indexer::index_records( $self, $record_numbers, $op, $server, undef ); } sub _get_record { -- 2.47.0