We are using elasticsearch 2.1.2.
And we are reading an excel sheet row by row from a for loop and using its values to save an associated document in each iteration. But everytime this operation is performed, around 5 to 7 documents are found which does not have the updated values. While debugging found that request was prepared with correct value and the index api was called. Also no error was thrown from the code.
We have elasticsearch in cluster mode with 3 nodes.
Code for index request:
IndexRequest indexRequest = new IndexRequest(indexName,docType,documentId).source(document);
ActionFuture<IndexResponse> indexActionFuture = client.index(indexRequest);
Note : It's very long flow of code from one file to another, so can't share all of them. Adding just the part where the request is being sent. Have debugged and I know that data is prepared correctly and the document object above is a HashMap with correct data, and also indexName,docType and documentId are correct here. Still some how on calling client.index the document is not indexed in the provided index and doctype.
What can be the possible reason for failure?