I'm trying to disable data_detection via curl.
I delete the shard
curl -s -H 'Content-Type: application/json' -X DELETE 'http://localhost:9200/video?pretty'
{
"acknowledged" : true
}
then
curl -H 'Content-Type: application/json' -X PUT 'http://localhost:9200/video?pretty' -d'{ "mappings": { "date_detection": false } }'
{
"error" : {
"root_cause" : [
{
"type" : "class_cast_exception",
"reason" : "class java.lang.Boolean cannot be cast to class java.util.Map (java.lang.Boolean and java.util.Map are in module java.base of loader 'bootstrap')"
}
],
"type" : "class_cast_exception",
"reason" : "class java.lang.Boolean cannot be cast to class java.util.Map (java.lang.Boolean and java.util.Map are in module java.base of loader 'bootstrap')"
},
"status" : 500
}
I've a field "meta" (array of metatags) but sometime a metatag is a date and
["error"]=>
array(2) {
["type"]=>
string(26) "illegal_argument_exception"
["reason"]=>
string(72) "mapper [meta] of different type, current_type [text], merged_type [date]"
}
so I think the solution is to disable date_detection.
correct?