Can't parse boolean value

Hello,

I have got the following issue on my production environnement :

2020-01-15 16:26:54] report.ERROR: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: {
"terms" : {
"spt_tea_organic" : [
"1"
],
"boost" : 1.0
}
}","index_uuid":"M5lx_hYUQvecb-W4TT_87A","index":"magento2_fr_fr_catalog_product_20200115_145333"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"magento2_fr_fr_catalog_product_20200115_145333","node":"2oLy_vV2Q7CFfKJWHV1NYA","reason":{"type":"query_shard_exception","reason":"failed to create query: {
"terms" : {
"spt_tea_organic" : [
"1"
],
"boost" : 1.0
}
}","index_uuid":"M5lx_hYUQvecb-W4TT_87A","index":"magento2_fr_fr_catalog_product_20200115_145333","caused_by":{"type":"illegal_argument_exception","reason":"Can't parse boolean value [1], expected [true] or [false]"}}}]},"status":400}

I understand the error, but I don't know wky I haven't got the same issue on my dev environnement.

Elasticsearch versions are not the same, I looked for an "autoformat" setting which will be not set on production but I did'nt find.

Elasticsearch version on dev environnement :

$ curl -X GET "localhost:9200"
{
"name" : "ECxs_A7",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "V6_C1U1kTyuC_MlV4wS9Pg",
"version" :

{ "number" : "5.3.2", "build_hash" : "3068195", "build_date" : "2017-04-24T16:15:59.481Z", "build_snapshot" : false, "lucene_version" : "6.4.2" }

,
"tagline" : "You Know, for Search"
}

Version production :

curl -X GET "elasticsearch-persistent:9200"
{
"name" : "2oLy_vV",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "iSGq_Z8FSguXlle9WtX3Dg",
"version" :

{ "number" : "6.8.5", "build_flavor" : "default", "build_type" : "docker", "build_hash" : "78990e9", "build_date" : "2019-11-13T20:04:24.100411Z", "build_snapshot" : false, "lucene_version" : "7.7.2", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }

,
"tagline" : "You Know, for Search"
}

Have you got an idea ?

Thanks you

As explained in this post, since version 6.0 you can no longer use "1" and "0" as Boolean values, only "true" and "false". Because you're running an old version, 5.3.2, it allows you to use 1 and 0 but when you try to index those as Boolean values to the new cluster, with version 6.8.5, it fails.

To solve this you will either have to reindex inside the old cluster first, replacing 0 -> false and 1 -> true, or use an ingest pipeline to replace those values while you index into the new cluster.

Good luck!

Ok that's was I suspected !

Thanks you