Skip to content

Commit

Permalink
Fixed using the wrong map in BatchingIndexSubmittor
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-hotz committed Nov 7, 2024
1 parent 34e1607 commit 83ea448
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public void run() {

private void sendDocumentsToIndex(Map<String, String> toIndex) {
EsRestClient restClient = searchManager.getClient();
BulkRequest bulkRequest = restClient.buildBulkRequest(searchManager.getDefaultIndex(), listOfDocumentsToIndex);
BulkRequest bulkRequest = restClient.buildBulkRequest(searchManager.getDefaultIndex(), toIndex);
CompletableFuture<Void> currentIndexFuture = restClient.getAsyncClient().bulk(bulkRequest)
.thenAcceptAsync(bulkItemResponses -> {
try {
searchManager.handleIndexResponse(bulkItemResponses, listOfDocumentsToIndex);
searchManager.handleIndexResponse(bulkItemResponses, toIndex);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit 83ea448

Please sign in to comment.