mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- fix @document_id check (found by tests)
This commit is contained in:
parent
62fea57657
commit
ca9c4a400d
2 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ class LogStash::Outputs::ElasticSearchHTTP < LogStash::Outputs::Base
|
|||
|
||||
def receive_bulk(event, index, type)
|
||||
header = { "index" => { "_index" => index, "_type" => type } }
|
||||
if @document_id.nil?
|
||||
if !@document_id.nil?
|
||||
header["index"]["_id"] = event.sprintf(@document_id)
|
||||
end
|
||||
@queue << [
|
||||
|
|
|
@ -207,7 +207,7 @@ class LogStash::Outputs::ElasticSearchRiver < LogStash::Outputs::Base
|
|||
# "action\ndata\n"
|
||||
# where 'action' is index or delete, data is the data to index.
|
||||
header = { "index" => { "_index" => index, "_type" => type } }
|
||||
if @document_id.nil?
|
||||
if !@document_id.nil?
|
||||
header["index"]["_id"] = event.sprintf(@document_id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue