0
bulkRequest.addAction(new Index.Builder(pubAdStatsGeoWiseModel)
.index(PublisherStatsConstants.geo_wise_ad_users_by_day_index)
.type(PublisherStatsConstants.geo_wise_ad_users_by_day_type).
.id(upsertUniqueId(res)).build());

jestClient.execute(bulkRequest.build());

Here is my query to insert document,but I want to insert 1000 at a time.Is it possible to give batch size using jest?

Nkosi
  • 235,767
  • 35
  • 427
  • 472

1 Answers1

0

Never tried jest, but usually you need to construct your bulkRequest calling addAction as many items you want to insert/update/delete at once.

jordivador
  • 1,016
  • 11
  • 26
  • There is no API to mention batch size – vinayak futak May 22 '18 at 12:14
  • There's no way to tell bulkRequest which size will have, you can sent up to 1000 items (configurable in ES). Maybe is worth take look to this question https://stackoverflow.com/questions/16920902/elasticsearch-java-bulk-batch-size – jordivador May 22 '18 at 12:24