It happens that the latest transform fails with the following error:
"reason" : "Failed to index documents into destination index due to permanent error [org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced [1] failures and at least 1 irrecoverable [mapper [products.min_price] cannot be changed from type [long] to [float]]. Other failures:; java.lang.IllegalArgumentException: mapper [products.min_price] cannot be changed from type [long] to [float]]",
Steps to reproduce:
- Start Kibana
- Load
kibana_sample_data_ecommerce dataset
- Go to "Dev Tools"
- Create a transform:
PUT _transform/debug_mappings
{
"source": {
"index": [ "kibana_sample_data_ecommerce" ]
},
"dest": {
"index": "ecommerce_dest"
},
"latest": {
"unique_key": [ "category.keyword" ],
"sort": "order_date"
}
}
- Start the transform:
POST _transform/debug_mappings/_start
- Get transform stats:
GET _transform/debug_mappings/_stats
The reason for this error is that the products.min_price mapped type in the source index is half_float but the field value is sometimes an integer.
Then, due to dynamic mappings in the destination index, the products.min_price gets mapped as long and cannot be further changed from long to float.
Workaround:
Create destination index mappings explicitly (at least for this one problematic field):
PUT ecommerce_dest
{
"mappings": {
"properties": {
"products": {
"properties": {
"min_price": {
"type": "float"
}
}
}
}
}
}
It happens that the
latesttransform fails with the following error:Steps to reproduce:
kibana_sample_data_ecommercedatasetThe reason for this error is that the
products.min_pricemapped type in the source index ishalf_floatbut the field value is sometimes an integer.Then, due to dynamic mappings in the destination index, the
products.min_pricegets mapped aslongand cannot be further changed fromlongtofloat.Workaround:
Create destination index mappings explicitly (at least for this one problematic field):