Maintain _id while Filtering from ES to ES via Logstash

Hi, I would like to filter an ES index to another ES index via logstash but currently the _id isn't maintained. How an I get this done?
input {
elasticsearch {
hosts => "someip"
user =>
password => ""
index => "someindex"

}
}
filter{
mutate {
convert => {
"verified" => "integer"
"number_of_employee" => "integer"
"number_of_connections" => "integer"
"years_in_operation" => "integer"
}
}
}

output {
#stdout { codec => json_lines }
elasticsearch {
#protocol => http
hosts => "someip"
user =>
password => ""
index => "someindex2"
document_type => "company"
document_id => "%{[document_id]}"

}

}

The documentation of the docinfo option of the elasticsearch input contains an example of this.

found it. thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.