【发布时间】:2016-09-04 07:00:09
【问题描述】:
我已经使用 cmd 删除映射
curl -XDELETE 'http://localhost:9200/logstash_log*/'
在我的 conf 中,我将索引定义如下,
output {
elasticsearch {
hosts => localhost
index => "logstash_log-%{+YYYY.MM.dd}"
}
并尝试创建一个新的映射,但我得到了错误
#curl -XPUT http://localhost:9200/logstash_log*/_mapping/log -d '
{
"properties":{
"@timestamp":"type":"date","format":"strict_date_optional_time||epoch_millis"},
"message":{"type":"string"},
"host":{"type":"ip"},
"name":{"type":"string","index": "not_analyzed"},
"type":{"type":"string"}
}
}'
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"没有这样的索引","resource.type":"index_or_alias","resource.id":" logstash_log*","index":"logstash_log*"}],"type":"index_not_found_exception","reason":"没有这样的索引","resource.type":"index_or_alias","resource.id":" logstash_log*","index":"logstash_log*"},"status":404}
我该如何解决? 任何帮助将不胜感激!
【问题讨论】:
标签: elasticsearch mapping