Skip to content

Commit

Permalink
Updated a method name per PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Helma <[email protected]>
  • Loading branch information
chelma committed Apr 24, 2024
1 parent 060fdbe commit bd87ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RFS/src/main/java/com/rfs/common/DocumentReindexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void reindex(String indexName, Flux<Document> documentStream, Conn
documentStream
.map(DocumentReindexer::convertDocumentToBulkSection) // Convert each Document to part of a bulk operation
.buffer(MAX_BATCH_SIZE) // Collect until you hit the batch size
.map(DocumentReindexer::convertToBulkJson) // Assemble the bulk request body from the parts
.map(DocumentReindexer::convertToBulkRequestBody) // Assemble the bulk request body from the parts
.flatMap(bulkJson -> sendBulkRequest(client, targetUrl, bulkJson)) // Send the request
.retryWhen(Retry.backoff(3, Duration.ofSeconds(1)).maxBackoff(Duration.ofSeconds(5)))
.subscribe(
Expand All @@ -52,7 +52,7 @@ private static String convertDocumentToBulkSection(Document document) {
return action + "\n" + source;
}

private static String convertToBulkJson(List<String> bulkSections) {
private static String convertToBulkRequestBody(List<String> bulkSections) {
logger.info(bulkSections.size() + " documents in current bulk request");
StringBuilder builder = new StringBuilder();
for (String section : bulkSections) {
Expand Down

0 comments on commit bd87ce5

Please sign in to comment.