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
}
成功