Should setting op_type = create on the _bulk API be faster than index?

Hi there!

We have some indices using datastreams so we have to set op_type to create in logstash. But for other append-only non-datastream indices, is there any performance benefit to setting it there aswell?

No, I do not think there is. If you are letting Elasticsearch set the document IDs this is as far as I know already optimised to be handles the same way a create is (Elasticsearch knows the document does not already exist). If you on the other hand are setting your own IDs Elasticsearch still has to check if the document already exists so would not reduce the amount of work, just cause failures if the document alraeady exists.

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