_reindex only latest version of doc

Hello!

I was reading https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html and I am not entirely certain on how to reindex documents latest version only.

If I have a document lets say with version of 8, I only want to reindex that version (latest) and not all 8 on top of each other.

I am not totally certain what combination of op_type, version_type and conflicts I want to use to accomplish this.

Thanks!

Unless you have some kind of special version field that you maintain, the default versioning built into Elasticsearch will get you the most recent version only when you reindex.

Gotcha.

So the part that says:

By default version conflicts abort the _reindex process but you can just 
count them by settings "conflicts": "proceed" in the request body

Is basically just saying if version 8 exists on destination when source tries to send the document it will skip the document?

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