Skip to content

Commit

Permalink
Merge pull request #314 from kailash/bug/async_api
Browse files Browse the repository at this point in the history
sleep between two elastic scroll calls
  • Loading branch information
Kailash Adhikari authored Sep 30, 2022
2 parents 41e588a + 9d5e73a commit 0e04394
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public ElasticClient scrollAsync(File file, String index, QueryBuilder query, St
double iterationCount = 0.0;
double progress;
while (searchHits != null && searchHits.length > 0) {
Thread.sleep(1000);
LOGGER.debug("results = {} ( {} new)", totalFiles += searchHits.length, searchHits.length);
iterationCount += 1;
progress = iterationCount / totalIterations;
Expand Down

0 comments on commit 0e04394

Please sign in to comment.