# Reindex from 2.4 to 6.5 failed on boolean type

**URL:** <https://discuss.elastic.co/t/reindex-from-2-4-to-6-5-failed-on-boolean-type/158846>\
**Category:** Elasticsearch\
**Created:** [November 30, 2018, 3:49am UTC](https://discuss.elastic.co/t/reindex-from-2-4-to-6-5-failed-on-boolean-type/158846 "2018-11-30T03:49:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [November 30, 2018, 5:13am UTC](https://discuss.elastic.co/t/reindex-from-2-4-to-6-5-failed-on-boolean-type/158846/2 "2018-11-30T05:13:03Z")

</div>

> [@cynosureabu](#):
>
> but seems 6.5 does not support 0|1 any more.

Yes, that bit me too. Before Elasticsearch 6.0 you could use 1 and 0 for boolean _true_ and _false_, but not anymore.

> [@cynosureabu](#):
>
> Any way to get around this?

You will have to update the integer values to booleans, 0 -\> false and 1 -\> true, before you can upgrade to Elasticsearch 6.x.

The way I solved it was to create a [pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/current/pipeline.html) with a processor that transformed the problematic integer values to proper booleans and then used this pipeline in a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) operation. When all indices had been reindexed I could upgrade my cluster to ES 6 without further problems.

Both pipelines and the reindex API are available in Elasticsearch 2.4 but I have no experience using them in that old version; my upgrade was done from version 5.6 so if you struggle using pipelines in the reindexing step you could first try to upgrade from 2.4 to 5.6, without changing the boolean field values, and from there to 6.5 using the aforementioned pipeline to fix the integer values.

---

_[View the full topic](https://discuss.elastic.co/t/reindex-from-2-4-to-6-5-failed-on-boolean-type/158846)._
