elasticsearch - 在 Elasticsearch 中更改映射字段结构流程
问题描述
我有一个映射索引
{
"mappings": {
"properties": {
"title": {
"type": "text"
},
"location": {
"type": "keyword"
}
}
}
}
目前在location
字段中,我们正在存储城市名称。我们需要改变映射结构来存储国家和州,所以映射将是
{
"mappings": {
"properties": {
"title": {
"type": "text"
},
"location": {
"properties": {
"country": {
"type": "keyword"
},
"state": {
"type": "keyword"
},
"city": {
"type": "keyword"
}
}
}
}
}
}
这种迁移的推荐流程是什么?
解决方案
跟着这些步骤:
推荐阅读
- asp.net-core - 在控制器中的 db.SaveChangesAsync 之后调用 SignalR SendAsync
- ansible - 有没有办法将 vmware guest.hostName 作为 ansible_host 而不是 IP 地址返回
- java - 如何在java上对某些文本进行编号?
- python - Socket 服务器只接受来自最后连接的客户端的 MSG
- vue.js - Cannot read property 'dispatch' of undefined VueJS
- html - 如何在 CSS 中选择扩展或扩展字体样式以实现跨浏览器兼容性?
- npm - 为什么 npm 包不会自动安装其所有依赖项?
- reactjs - react-redux-firebase 没有在 Firestore 上正确存储 providerData
- python - Is there something like js hoisting for class definitions in python?
- php - SQL Function Like