How to know the internal mechanism of elasticsearch when a document is updated?

Hi All,

Elasticsearch Version: 5.4.3

  1. I'm updating a document in elasticsearch using UPDATE API

Command: curl -X POST "node1:9200/index1/external/1/_update?pretty" -H 'Content-Type: application/json' -d'
{
"doc": { "name": "Elastic" }
}'

Whenever we do an update, Elasticsearch deletes the old document and then indexes a new document with the update applied to it in one shot.

I have been following the below link: -
Link: Updating Documents | Elasticsearch Reference [5.4] | Elastic

No logs are generating for deleting the old document (related files). Only logs for updating the document are being generated (such as writing the translog files at the time of updating document).

Please let me know the tool or any method to understand the internal behaviour of elasticsearch when the document is updated

Regards
Nikhil Kapoor

This is all done by Apache Lucene under the hood, so your best bet is to properly understand how lucene works. https://lucene.apache.org/core/7_5_0/index.html is a good start for this.

From an ES point of view the TransportUpdateAction would be a good start.

--Alex

Thanks @spinscale for the response.

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