logstash config我已經在elasticsearch上創建了我的索引,並通過kibana創建了我的索引並已上傳數據。現在我想改變索引的映射,並將一些字段更改爲不分析.Below是我想從現有的映射替換的映射。但是當我運行下面的命令,它給了我錯誤映射彈性搜索的娛樂
{ 「錯誤」:{ 「ROOT_CAUSE」:[{ 「類型」: 「index_already_exists_exception」, 「原因」: 「已經 存在」, 「指標」: 「rettrmt」}], 「類型」: 「index_already_exists_exception」, 「原因」: 「已經 存在」, 「指數」: 「rettrmt」}, 「狀態」:400}
請幫助得到它關。
curl -XPUT 'http://10.56.139.61:9200/rettrmt' -d '{
"rettrmt": {
"aliases": {},
"mappings": {
"RETTRMT": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"@version": {
"type": "string"
},
"acid": {
"type": "string"
},
"actor_id": {
"type": "string",
"index": "not_analyzed"
},
"actor_type": {
"type": "string",
"index": "not_analyzed"
},
"channel_id": {
"type": "string",
"index": "not_analyzed"
},
"circle": {
"type": "string",
"index": "not_analyzed"
},
"cr_dr_indicator": {
"type": "string",
"index": "not_analyzed"
},
"host": {
"type": "string"
},
"message": {
"type": "string"
},
"orig_input_amt": {
"type": "double"
},
"path": {
"type": "string"
},
"r_cre_id": {
"type": "string"
},
"sub_use_case": {
"type": "string",
"index": "not_analyzed"
},
"tran_amt": {
"type": "double"
},
"tran_id": {
"type": "string"
},
"tran_particulars": {
"type": "string"
},
"tran_particulars_2": {
"type": "string"
},
"tran_remarks": {
"type": "string"
},
"tran_sub_type": {
"type": "string"
},
"tran_timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"tran_type": {
"type": "string"
},
"type": {
"type": "string"
},
"use_case": {
"type": "string",
"index": "not_analyzed"
}
}
}
},
"settings": {
"index": {
"creation_date": "1457331693603",
"uuid": "2bR0yOQtSqqVUb8lVE2dUA",
"number_of_replicas": "1",
"number_of_shards": "5",
"version": {
"created": "2000099"
}
}
},
"warmers": {}
}
}'
如果我會刪除它會刪除數據,以及該指數是不是? –
但是我刪除了索引,所以它也刪除了數據,然後再次運行我的命令以更改映射。它只是把我需要的映射,但是當我再次上傳數據,然後通過kibana再次看到分析的字段,我把它放在我的映射中沒有分析。任何猜測我做錯了什麼。 –
是的,但如果要更改映射,則沒有選擇。 – Val