We use a single node environment since we have adopted Elasticsearch recently. We are facing Elasticsearch indexing issues when 4 subsequent indexing requests were made at approximately 50 - 100ms interval each. Elasticsearch updated few fields based on the current requests but retained other fields with the old values. The expectation is all fields should be updated based on the request passed.
We have also added setRetryOnConflict(1) in our code base so we are not really sure what could be the issue and probable solution.
But we are seeing the indexing response from Elasticsearch holding the result as 'updated' also the version and seqNo are updated and the problem is some fields are updated and some are not
Also, we have setDocAsUpsert(true) in our code base.
For example, if we have an index data as below
{
"emp_id": 123,
"emp_name":"sample",
"company" :"company1",
"experience":"10 years"
}
And the data to be updated is as below
Company - company2
Experience - 13 years
The data updated in Elasticsearch is as below
{
"emp_id": 123,
"emp_name":"sample",
"company" :"company2", -> updated
"experience":"10 years" - > not updated
}
Similarly few fields are updating and few are not.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.