elasticsearch_http: Use source._id automatically

This is an alternative to using document_id option.  Better suited to diverse deployments when some sources provide unique id and others don't.
When _id is not defined, event.format("%{_id}") expands to "" but we need
nil.

2014-10-10 21:08 GMT+02:00 Jordan Sissel <notifications@github.com>:

> In lib/logstash/outputs/elasticsearch.rb:
>
> > @@ -303,7 +304,7 @@ def receive(event)
> >
> >      index = event.sprintf(@index)
> >
> > -    document_id = @document_id ? event.sprintf(@document_id) : nil
> > +    document_id = @document_id ? event.sprintf(@document_id) : event["_id"]
>
> I don't think there should be a default value. If you really intend the
> "_id" field to be used, you can set document_id => "%{_id}".
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/elasticsearch/logstash/pull/1783/files#r18724649>.
>