I want to re-index a text field to keyword.
I have multiple indices (myindex-000001, myindex-000002, etc)
In order to reindex I must: a) get the mapping b) create a new index mynewindex-000001 same field name but different type (text->keyword).
Then repeat the procedure for all indices.
Is this logic correct?
Here is the index mapping ( I want to change host,path and tags to type "keyword")
{
"myindex-000001" : {
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
},
"@version" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"host" : {
"type" : "text"
},
"message" : {
"type" : "text"
},
"path" : {
"type" : "text"
},
"tags" : {
"type" : "text"
},
"timestamp" : {
"type" : "date"
},
"version" : {
"type" : "text"
}
}
}
}
}