From 6a123dc839da32c95e8cc3053bb18c424db0cd86 Mon Sep 17 00:00:00 2001 From: Tobias Hotz Date: Tue, 5 Nov 2024 15:16:54 +0100 Subject: [PATCH] Fixed using the wrong map in BatchingIndexSubmittor --- .../kernel/search/submission/BatchingIndexSubmittor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/fao/geonet/kernel/search/submission/BatchingIndexSubmittor.java b/core/src/main/java/org/fao/geonet/kernel/search/submission/BatchingIndexSubmittor.java index 559b405d47d..36a14510019 100644 --- a/core/src/main/java/org/fao/geonet/kernel/search/submission/BatchingIndexSubmittor.java +++ b/core/src/main/java/org/fao/geonet/kernel/search/submission/BatchingIndexSubmittor.java @@ -48,11 +48,11 @@ public void run() { private void sendDocumentsToIndex(Map toIndex) { EsRestClient restClient = searchManager.getClient(); - BulkRequest bulkRequest = restClient.buildBulkRequest(searchManager.getDefaultIndex(), listOfDocumentsToIndex); + BulkRequest bulkRequest = restClient.buildBulkRequest(searchManager.getDefaultIndex(), toIndex); CompletableFuture currentIndexFuture = restClient.getAsyncClient().bulk(bulkRequest) .thenAcceptAsync(bulkItemResponses -> { try { - searchManager.handleIndexResponse(bulkItemResponses, listOfDocumentsToIndex); + searchManager.handleIndexResponse(bulkItemResponses, toIndex); } catch (IOException e) { throw new UncheckedIOException(e); }