使用logstash迁移elasticsearch
input { elasticsearch { hosts => "127.0.0.1:9200" index => "building" size => 5000 scroll => "5m" docinfo => true } } filter { } output { elasticsearch { hosts => ["127.0.0.1:9201"] index => "building" document_type => "%{[@metadata][_type]}" document_id => "%{[@metadata][_id]}" } # stdout { codec => rubydebug { metadata => true } } }
注意:如果是代理过的,可以写成:http://127.0.0.1:81/es/