ElasticSearch修改Mapping字段
程序员文章站
2022-07-05 14:00:21
...
ES在建好索引后不能再修改Mapping 了,这时候如果要改的话只能新建一个字段,如下所示把logMesssage是text类型,新建一个logMessage.row字段,类型是keyword
PUT prn-/_mapping/prnformat
{
"properties": {
"logMessage": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
}
}
}
}
来源:https://discuss.elastic.co/t/how-to-make-a-field-aggregatable-in-kibana/90470/9