Reindex from 2.4 to 6.5 failed on boolean type

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

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 with a processor that transformed the problematic integer values to proper booleans and then used this pipeline in a reindex 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.

2 Likes