# \_reindex only latest version of doc

**URL:** https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849
**Category:** Elasticsearch
**Created:** [December 22, 2016, 9:49pm UTC](https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849 "2016-12-22T21:49:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![voipoclay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voipoclay/32/4372_2.png) [@voipoclay](https://discuss.elastic.co/u/voipoclay)
#### Post date: [December 22, 2016, 9:49pm UTC](https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849/1 "2016-12-22T21:49:24Z")

</div>

Hello!

I was reading [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html](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!

---

<div class="post-metadata">

### Author: ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)
#### Post date: [December 22, 2016, 10:35pm UTC](https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849/2 "2016-12-22T22:35:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![voipoclay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voipoclay/32/4372_2.png) [@voipoclay](https://discuss.elastic.co/u/voipoclay)
#### Post date: [December 22, 2016, 10:59pm UTC](https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849/3 "2016-12-22T22:59:31Z")

</div>

Gotcha.

So the part that says:

```auto
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?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 19, 2017, 10:59pm UTC](https://discuss.elastic.co/t/-reindex-only-latest-version-of-doc/69849/4 "2017-01-19T22:59:43Z")

</div>

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