logstash-output-elasticsearch 5.1.2-java → 5.2.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d467502b3717a7e37fb897d6efc9fb690d03f045
4
- data.tar.gz: 3f73d6fa34b9bc65bce91210bf45dd3fb2e935c1
3
+ metadata.gz: d553066aa5a9463be1990f8eb44e9d5803bee747
4
+ data.tar.gz: 2d277b0d77b2baa69afcc2a842a68a2fe0f07ae6
5
5
  SHA512:
6
- metadata.gz: 7daa79d6457e3fe835cad7603a84016ef1964b4d836fbe766139c3a6a2a0438af0c31c11ca8861150198fb7cec2d362028fe3b379e271d9db7ef3f5d7e2d6ab7
7
- data.tar.gz: fae281ebd446f93f4cdbf9785143cfa0d3294d9b9b67d17098b60f8139f4903f0abeddb379e2e25e6406335e8e33291148d3d76e58b91da58581b91503f9a511
6
+ metadata.gz: 8b69222e253ad2ab4ecdc3805e9c02077344fed9820ef0c116ea2157ff67d8d1f0df4bc701f0df1d7042a1e43a218ff846f3c3fdfa8e47252158722dc9736808
7
+ data.tar.gz: f314dc238f4704775a4ba5019aa3f4a70561be8bf50001b50e6df6a101bfeef7851fe06bf470b839a393b55dd577f69413bb47c0117ea18f9805bbf29dfb18a0
@@ -1,3 +1,6 @@
1
+ ## 5.2.0
2
+ - Change default lang for scripts to be painless, inline with ES 5.0. Earlier there was no default.
3
+
1
4
  ## 5.1.2
2
5
  - Hide credentials in exceptions and log messages ([#482](https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/482))
3
6
  - [internal] Remove dependency on longshoreman project
@@ -114,8 +114,8 @@ module LogStash; module Outputs; class ElasticSearch
114
114
  # file : "script" contains the name of script stored in elasticseach's config directory
115
115
  mod.config :script_type, :validate => ["inline", 'indexed', "file"], :default => ["inline"]
116
116
 
117
- # Set the language of the used script
118
- mod.config :script_lang, :validate => :string, :default => ""
117
+ # Set the language of the used script. If not set, this defaults to painless in ES 5.0
118
+ mod.config :script_lang, :validate => :string, :default => "painless"
119
119
 
120
120
  # Set variable name passed to script (scripted update)
121
121
  mod.config :script_var_name, :validate => :string, :default => "event"
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '5.1.2'
4
+ s.version = '5.2.0'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -3,7 +3,7 @@ require_relative "../../../spec/es_spec_helper"
3
3
  describe "client create actions", :integration => true do
4
4
  require "logstash/outputs/elasticsearch"
5
5
 
6
- def get_es_output(action, id = nil)
6
+ def get_es_output(action, id)
7
7
  settings = {
8
8
  "manage_template" => true,
9
9
  "index" => "logstash-create",
@@ -11,7 +11,7 @@ describe "client create actions", :integration => true do
11
11
  "hosts" => get_host_port(),
12
12
  "action" => action
13
13
  }
14
- settings['document_id'] = id unless id.nil?
14
+ settings['document_id'] = id
15
15
  LogStash::Outputs::ElasticSearch.new(settings)
16
16
  end
17
17
 
@@ -36,17 +36,5 @@ describe "client create actions", :integration => true do
36
36
  insist { r["hits"]["total"] } == 1
37
37
  end
38
38
  end
39
-
40
- it "should create new documents without id" do
41
- subject = get_es_output("create")
42
- subject.register
43
- subject.multi_receive([LogStash::Event.new("message" => "sample message here")])
44
- @es.indices.refresh
45
- # Wait or fail until everything's indexed.
46
- Stud::try(3.times) do
47
- r = @es.search
48
- insist { r["hits"]["total"] } == 1
49
- end
50
- end
51
39
  end
52
40
  end
@@ -33,7 +33,7 @@ shared_examples "a parent indexer" do
33
33
  Stud::try(10.times) do
34
34
  query = { "query" => { "has_parent" => { "type" => "#{type}_parent", "query" => { "match" => { "foo" => "bar" } } } } }
35
35
  data = ""
36
- response = ftw.post!("#{index_url}/_count?q=*", :body => query.to_json)
36
+ response = ftw.post!("#{index_url}/_count", :body => query.to_json)
37
37
  response.read_body { |chunk| data << chunk }
38
38
  result = LogStash::Json.load(data)
39
39
  cur_count = result["count"]
@@ -9,7 +9,8 @@ describe "Update actions", :integration => true, :version_greater_than_equal_to_
9
9
  "index" => "logstash-update",
10
10
  "template_overwrite" => true,
11
11
  "hosts" => get_host_port(),
12
- "action" => "update"
12
+ "action" => "update",
13
+ "script_lang" => "groovy"
13
14
  }
14
15
  LogStash::Outputs::ElasticSearch.new(settings.merge!(options))
15
16
  end
@@ -166,6 +167,7 @@ describe "Update actions", :integration => true, :version_greater_than_equal_to_
166
167
  subject = get_es_output({ 'document_id' => "456", 'script' => 'scripted_upsert', 'scripted_upsert' => true, 'script_type' => 'file' })
167
168
  subject.register
168
169
  subject.multi_receive([LogStash::Event.new("counter" => 1)])
170
+ @es.indices.refresh
169
171
  r = @es.get(:index => 'logstash-update', :type => 'logs', :id => "456", :refresh => true)
170
172
  insist { r["_source"]["counter"] } == 1
171
173
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
4
+ version: 5.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement