curl -XPUT localhost:9200/my_index/my_type/_mapping -d '
{
"my_type": {
"properties": {
"created": {
"type": "multi_field",
"fields": {
"created": { "type": "string" },
"date": { "type": "date" }
}
}
}
}
}
mapping需是json的格式,在mapping中可以更新field对应的数据类型,是否需要analyzer等
elasticsearch中更新mapping的方式
最新推荐文章于 2024-06-20 10:29:48 发布