# Upgrading indexes from 0.2 to 2.1.1

**URL:** <https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170>\
**Category:** Elasticsearch\
**Created:** [December 30, 2015, 11:37am UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170 "2015-12-30T11:37:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexspurling](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@alexspurling](https://discuss.elastic.co/u/alexspurling)\
**Post date:** [December 30, 2015, 11:37am UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/1 "2015-12-30T11:37:04Z")

</div>

Hi,

I am trying to upgrade a local instance of ES from version 0.2 to 2.1.1. Yes I know this is a pretty big jump. This is what happens when you stay out of the loop for a couple of years.

As far as I understand, the process is pretty simple. This is what I've done:

- Make a back up of my data directory
- Install and run ES 1.7.4
- Upgrade each index individually by running POST to indexname/\_upgrade
- Verify nothing else needs to be upgraded by running GET to \_upgrade (each index displays number of bytes that need upgrading as 0)
- Install and run ES 2.1.1
- I receive the following error:

`The index [policies] was created before v0.90.0 and wasn't upgraded. This index should be open using a version before 2.0.0 and upgraded using the upgrade API`

Note that I used the following documentation to upgrade my indices: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html)

Any ideas why the upgrade process failed? How can I check which version each of my indicies is at?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 30, 2015, 12:03pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/2 "2015-12-30T12:03:01Z")

</div>

I guess that `policies` is one of the indices you manually ran `_upgrade` on, right?  
And nothing appeared in logs?

I would probably open an issue about this.

---

<div class="post-metadata">

**Author:** ![alexspurling](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@alexspurling](https://discuss.elastic.co/u/alexspurling)\
**Post date:** [December 30, 2015, 12:49pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/3 "2015-12-30T12:49:09Z")

</div>

Yes policies is one of the indices I upgraded. I have 11 indices in total. I upgraded them all individually. When I start 2.1.1 I get that error above for just two indices (enquiries and policies) and the error appears twice for both for some reason.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 30, 2015, 1:06pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/4 "2015-12-30T13:06:13Z")

</div>

I think you should open an issue then...

---

<div class="post-metadata">

**Author:** ![alexspurling](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@alexspurling](https://discuss.elastic.co/u/alexspurling)\
**Post date:** [May 26, 2016, 1:53pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/5 "2016-05-26T13:53:55Z")

</div>

I've raised the issue here: [https://github.com/elastic/elasticsearch/issues/18591](https://github.com/elastic/elasticsearch/issues/18591)

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 26, 2016, 2:54pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/6 "2016-05-26T14:54:44Z")

</div>

0.2? Wow. Perhaps you meant 0.20? 0.2 would have been very very early. 🙂

After upgrading to 1.x, try doing a forced merge down to one segment.  
Perhaps some segments are still old. Since Lucene segments are immutable, a  
forced merge will create a new Lucene 4 segment out of the old segments.

Ivan

---

<div class="post-metadata">

**Author:** ![alexspurling](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@alexspurling](https://discuss.elastic.co/u/alexspurling)\
**Post date:** [May 26, 2016, 3:09pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/7 "2016-05-26T15:09:40Z")

</div>

Yes, I meant 0.20, not 0.2. It seems unfortunately that 1.7 does not support the forced merge operation.

---

<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:** [July 5, 2017, 10:48pm UTC](https://discuss.elastic.co/t/upgrading-indexes-from-0-2-to-2-1-1/38170/8 "2017-07-05T22:48:48Z")

</div>

Closed on July 5, 2017, 10:48pm UTC


