需要logstash配置以通过查询进行更新

时间:2019-03-11 10:07:10

标签: elasticsearch logstash

我需要在弹性索引的现有文档中添加/更新一些字段。我无法在logstash中使用更新API,因为有多个索引需要更新。我想为更新查询指定别名。你能分享你的想法吗?下面是内置的配置

<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->

input {
   file {
       path => "D:\Elastic\logstash-5.5.0\config\user_updated.csv"
       start_position => "beginning"
       sincedb_path => "D:\null"
   }
}

filter {
    csv {
        separator => ","
        columns => ["ID", "xml"]
    }
}
output {
    stdout {
        codec => rubydebug
    }
    http { 
        url => "http://localhost:9200/aliastest/doc/_update_by_query"
        http_method => "post"
        format => "json"
    }
}

0 个答案:

没有答案