Elasticsearch Re-indexing Issue

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.

Kindly help us with an approach.

Are these requests versioned at all?
If not, that's probably the best approach to take.

Hi.. Am not getting your question.

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.

What are some examples of the updates?

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.

Are you performing scripted updates?

Yes we are, through Elasticsearch Java client using setDocAsUpsert(true) and ActionRequestBuilder's get() method

Hi Warkolm, kindly help us on this

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