elasticsearch/logstash — pull request #1105 by jordansissel (2014-02-21 20:10:31+00:00)
Title: Elasticsearch deletes and unification (protocol => http)

This PR makes two changes:

1) Adds `protocol => http` support to elasticsearch output
2) Adds `action` setting. Action can be "index" or "delete"

## One elasticsearch plugin for all!

It continues to be silly that we have two separate elasticsearch output plugins. Technically 3, but the elasticsearch_river plugin isn't supported anymore.

With this PR, users will be able to select HTTP transport from the `elasticsearch` plugin. After, we can deprecate and eventually remove elasticsearch_http.

In working on this addition, I removed some very old code usage: jruby-elasticsearch. It was removed because originally, in a time Long Ago, jruby-elasticsearch was used for both 'elasticsearch' output and the logstash web interface. Since logstash web is dead (LONG LIVE KIBANA!), that means we only need "indexing" support, so basically all the boilerplate and java-wrapping in jruby-elasticsearch becomes unnecessary. Lastly, since jruby-elasticsearch is only used in logstash (as far as I am concerned), it makes sense to stop shipping it as a separate library.

Given the previous paragraph, I have refactored protocol operations into separate modules (http, node, transport) and have them provide the same API and configuration interface.

## Adding delete support

One common feature of elasticsearch rivers is using them, to keep elasticsearch in sync with a primary data source such as CouchDB.

In order to replace rivers, logstash must support deletes. This PR adds an 'action' setting helps you instruct logstash on the kind of action (index, delete, etc) a given event represents.