Rejecting mapping update to [house] as the final mapping would have more than 1 type: [housetype, do

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_30581017/article/details/79659089

本人今天创建索引及索引mapping
当logstash将mysql同步到es索引文档的时候,出现如上错误

[2018-03-22T14:17:42,271][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"%{houseId}", :_index=>"house", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0xbb14a9d>], :response=>{"index"=>{"_index"=>"house", "_type"=>"doc", "_id"=>"%{houseId}", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [house] as the final mapping would have more than 1 type: [housetype, doc]"}}}}

原因是我自己在创建索引映射的时候的索引类型设置为housetype,但是logstash在同步的时候会自动创建一个doc类型的index,所以引起冲突,,解决方式可以修改自己的索引映射为doc,这样就不会发生冲突了!

猜你喜欢

转载自blog.csdn.net/qq_30581017/article/details/79659089
今日推荐