ES 子文档索引进行字段添加操作
ES版本号:5.3.2
复制{
"name": "es-node-1",
"cluster_name": "es-b2b-dev0",
"cluster_uuid": "c5LjpmeLSV-1Px7eQv0zDw",
"version": {
"number": "5.3.2",
"build_hash": "3068195",
"build_date": "2017-04-24T16:15:59.481Z",
"build_snapshot": false,
"lucene_version": "6.4.2"
},
"tagline": "You Know, for Search"
}
复制PUT /item-store-search/item/_mapping
{
"properties": {
"sale_district_area": {
"type": "text",
"analyzer": "sp_with_comma"
}
}
}
item-store-search为索引名称,item为索引type类型,新版本改为"_doc"
报错提示:The _parent field's type option can't be changed: [store]->[null]
查看item对应的父文档类型为"store"
GET item-store-search/_mapping
需要指定,"_parent"属性,更新后文档信息为
复制PUT /item-store-search/item/_mapping
{
"_parent": {
"type": "store"
},
"properties": {
"sale_district_area": {
"type": "text",
"analyzer": "sp_with_comma"
}
}
}
提示:
复制{
"acknowledged": true
}
成功
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2021-08-17 Git版本管理流程与规范-生活圈
2018-08-17 五分钟读懂UML类图(转)