I tried creating document (id=1) using PUT to /_update with "doc_as_upsert" : true and doc field. The response "result" attribute had value "created" and "version" attribute had value "1".
Again, I updated the same document with all attributes as before (id=1) using PUT to /_update with "doc_as_upsert" : true and doc field. The response "result" attribute had value "noop" and "version" attribute had value "1".
Now, I updated the same document with all attributes but one changed (id=1) using PUT to /_update with "doc_as_upsert" : true and doc field. The response "result" attribute had value "updated" and "version" attribute had value "2".
As far I understand, EL checks each attribute of the document in input against the document in index and returns response based on following:
case 1: If there is no match, it returns "noop"
case 2: If there is at least one difference, it returns "updated"
case 3: if the document doesn't exists, it creates a new document and returns "created"
How does EL handles the above behaviour? Is there any hashing performed to determine changes?
Can someone confirm that no indexing happens for case 1?