有了這個映射:更新映射的屬性在現有的指數
curl -XPUT 'http://myip:9200/test?pretty' -d'
{
"mappings": {
"items": {
"dynamic": "strict",
"properties" : {
"title" : { "type": "string" },
"body" : { "type": "string" },
"publish_up" : { "type": "date",
"format" : "yyyy-MM-dd HH:mm:ss",
"copy_to": "publication_date"},
"publication_date" : { "type": "date",
"format" : "yyyy-MM-dd HH:mm:ss"},
}}}}'
我想以此來回報值using fields財產publication_date
更改爲"store" : "yes"
。這是我的嘗試:
curl -X PUT 'http://myip:9200/test/_mapping/items?ignore_conflicts=true' -d '{
"items": {
"properties": {
"publication_date": {
"type": "date",
"format" : "yyyy-MM-dd HH:mm:ss",
"store" : "yes"
}}}}'
但我得到的錯誤
{ 「錯誤」:{ 「ROOT_CAUSE」:[{ 「類型」: 「illegal_argument_exception」, 「原因」:「映射 對於[publication_date]與其他 類型中的現有映射衝突:\ n [mapper [publication_date]具有不同的[store] values]「}],」type「:」illegal_argument_exception「,」reason「:」Mapper for [publication_date ]與其他 類型中的現有映射衝突:\ n [mapper [publication_date]有不同的[store] values]「},」status「:400}
任何幫助?提前致謝。
PS:我正在使用ES 2.3