How can I add bulk indexing batch sizes of 1000 in my elastic index?

I want to copy 30000 data from cassandra to elastic search,but I want to copy using bulk request(at a time 1000 data can be write to elastic search).

This is how I created bulk object
Builder bulkRequest = new Bulk.Builder();

And this is the logic to enter data in elastic search

bulkRequest.addAction(new Index.Builder(app).index(PublisherStatsConstants.geo_wise_ad_users_by_day_index).type(PublisherStatsConstants.geo_wise_ad_users_by_day_type).id("userid").build();
jestClient.execute(bulkRequest.build());

How can I add 1000 record in bulk to index?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.