Logstash Update a document in elasticsearch

EDIT: I for to mention that you need to generate your own document_id and set that. So in order to update a existing document you need to set a id on the initial document and reuse that. (bad example: ie: email_address) or query ES for the document_id using the logstash-filter-elasticsearch plugin.

It will look something like this.

output {
    elasticsearch {
        host => 'your es host'
        action => 'update'
        document_id => 'your generated document id'
        index => 'your index name
    }
}

https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-action