Bulkindex in elasticsearch(facing exception heap size out of memory)

hi ,
can anyone help me how to resolve this issue ?
My Es version: 5.6.2
I am using JestClient for connecting es
language: java

I am having the list of datas (like 10000 ) how to write bulk index API facing exception while using for loop more than 2000 data? i have indexed like this

for(Data data : datas) {
bulkRequest.addAction(new Index.Builder(MoveToElasticSearch(data)) .index("test_prod").type("test").id(constructElasticId(data)).build());

}
thanks in advance

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