您在
elasticsearch输出中缺少以下设置:
document_type => "song"
发生的是,logstash创建了一个新类型
logs(默认情况下),并且由于从ES 2.0版本开始,它被禁止在同一个索引中包含两个具有相同名称但不同类型(
stringvs
completion)的字段,因此会出错。
只需像这样修改您的输出,它将起作用:
output { elasticsearch { hosts => "localhost" index => "music" document_type => "song" document_id => "%{id}" }}


