使用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 } }
}

 

上一篇:生产者的基本实现


下一篇:[ZJOI2007]最大半连通子图【tarjan缩点】【拓扑排序+DP】