{
"properties":{
"device":{
"type":"object",
"properties":{
"id":{
"type":"keyword"
},
"value":{
"type":"keyword"
}
}
}
}
}
I wanted to update mapping value as text, when I'm trying to update using https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html throws an error. "mapper [device.value] of different type, current_type [keyword], merged_type [text]"
{
"properties":{
"device":{
"type":"object",
"properties":{
"id":{
"type":"keyword"
},
"value":{
"type":"text"
}
}
}
}
}
Someone help me update index from keyword to text?
CodePudding user response:
Changing field type is a breaking change, you need to
Create a new index with new required mapping.
use reindex API to move data from old to new index(optional if you are OK with data loss)