Validation error when trying to re-index

I have an index say test_index which I create using a template.

Everything was working fine until I tried to update the template, delete the index and create the index again with the updated template. (I did these steps successfully a couple of times).

I use the BulkRequestBuilder java API for indexing.

The error I get is
org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: source is missing

Appreciate your help to resolve this issue please.

Thanks,
Kavi

I figured it out. I accidentally removed the setSource() on bulkRequest.add() method !!