As we have in Elasticsearch, that'd be great to have a Bulk API which would automatically index documents with at most 100 documents per request. So instead of managing this on the client level, devs would only write things similar to:
BulkProcessor bulkProcessor = BulkProcessor.builder(
new SimpleLoggerListener())
.setBulkActions(bulkSize)
.setFlushInterval(TimeValue.timeValueSeconds(5))
.build();
Then using it is only writing things like:
for (int i = 0; i < 100000; i++) {
bulkProcessor.add(json);
}