Skip to content

Commit 1aedbc6

Browse files
jsvdrobbavey
authored andcommitted
bump to 10.0.0
Fixes #828
1 parent 1ba256d commit 1aedbc6

File tree

4 files changed

+7
-72
lines changed

4 files changed

+7
-72
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 10.0.0
2+
- Changed deprecated `document_type` option to obsolete
3+
- Remove support for parent child (still support join data type) since we don't support multiple document types any more
4+
- Removed obsolete `flush_size` and `idle_flush_time`
5+
16
## 9.3.2
27
- Fixed sniffing support for 7.x [#827](https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/827)
38

lib/logstash/outputs/elasticsearch/common_configs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def self.included(mod)
7676
mod.config :routing, :validate => :string
7777

7878
# For child documents, ID of the associated parent.
79-
# This can be dynamic using the `%{foo}` syntax.:w
79+
# This can be dynamic using the `%{foo}` syntax.
8080
mod.config :parent, :validate => :string, :default => nil
8181

8282
# For child documents, name of the join field

logstash-output-elasticsearch.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'logstash-output-elasticsearch'
3-
s.version = '9.3.2'
3+
s.version = '10.0.0'
44
s.licenses = ['apache-2.0']
55
s.summary = "Stores logs in Elasticsearch"
66
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"

spec/integration/outputs/parent_spec.rb

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,6 @@
11
require_relative "../../../spec/es_spec_helper"
22
require "logstash/outputs/elasticsearch"
33

4-
if ESHelper.es_version_satisfies?("<= 5.x")
5-
context "when using elasticsearch 5.x and before", :integration => true do
6-
shared_examples "a type based parent indexer" do
7-
let(:index) { 10.times.collect { rand(10).to_s }.join("") }
8-
let(:type) { 10.times.collect { rand(10).to_s }.join("") }
9-
let(:event_count) { 10000 + rand(500) }
10-
let(:parent) { "not_implemented" }
11-
let(:config) { "not_implemented" }
12-
let(:default_headers) {
13-
{"Content-Type" => "application/json"}
14-
}
15-
subject { LogStash::Outputs::ElasticSearch.new(config) }
16-
17-
before do
18-
# Add mapping and a parent document
19-
index_url = "http://#{get_host_port()}/#{index}"
20-
mapping = { "mappings" => { "#{type}" => { "_parent" => { "type" => "#{type}_parent" } } } }
21-
Manticore.put("#{index_url}", {:body => mapping.to_json, :headers => default_headers}).call
22-
pdoc = { "foo" => "bar" }
23-
Manticore.put("#{index_url}/#{type}_parent/test", {:body => pdoc.to_json, :headers => default_headers}).call
24-
25-
subject.register
26-
subject.multi_receive(event_count.times.map { LogStash::Event.new("link_to" => "test", "message" => "Hello World!", "type" => type) })
27-
end
28-
29-
30-
it "ships events" do
31-
index_url = "http://#{get_host_port()}/#{index}"
32-
33-
Manticore.post("#{index_url}/_refresh").call
34-
35-
# Wait until all events are available.
36-
Stud::try(10.times) do
37-
query = { "query" => { "has_parent" => { "type" => "#{type}_parent", "query" => { "match" => { "foo" => "bar" } } } } }
38-
response = Manticore.post("#{index_url}/_count", {:body => query.to_json, :headers => default_headers})
39-
data = response.body
40-
result = LogStash::Json.load(data)
41-
cur_count = result["count"]
42-
expect(cur_count).to eq(event_count)
43-
end
44-
end
45-
end
46-
47-
describe "(http protocol) index events with static parent" do
48-
it_behaves_like 'a type based parent indexer' do
49-
let(:parent) { "test" }
50-
let(:config) {
51-
{
52-
"hosts" => get_host_port,
53-
"index" => index,
54-
"parent" => parent
55-
}
56-
}
57-
end
58-
end
59-
60-
describe "(http_protocol) index events with fieldref in parent value" do
61-
it_behaves_like 'a type based parent indexer' do
62-
let(:config) {
63-
{
64-
"hosts" => get_host_port,
65-
"index" => index,
66-
"parent" => "%{link_to}"
67-
}
68-
}
69-
end
70-
end
71-
end
72-
end
73-
744
if ESHelper.es_version_satisfies?(">= 5.6")
755
context "when using elasticsearch 5.6 and above", :integration => true do
766

0 commit comments

Comments
 (0)