Skip to content

Commit

Permalink
fix: the elasticsearch.bulk :body_stats msg was moved outside of body
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgz committed Nov 27, 2023
1 parent df13590 commit 23c5a1c
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion esse.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.authors = ['Marcos G. Zimmermann']
spec.email = ['[email protected]']

spec.summary = %[Pure Ruby and framework-agnostic ElasticSearch/OpenSearch toolkit for building indexers and searchers]
spec.summary = %(Pure Ruby and framework-agnostic ElasticSearch/OpenSearch toolkit for building indexers and searchers)
spec.description = 'With all elegance of Ruby and ElasticSearch flexibility this gem brings to you the best of both ' \
'worlds. Provides a solid architecture allowing to easily Extract, Transform, Enrich and Load ' \
'data from any data source into ElasticSearch/OpenSearch and also to search it. It is framework-agnostic, ' \
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-1.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-2.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-5.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-6.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-7.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.elasticsearch-8.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.opensearch-1.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.opensearch-2.x.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
esse (0.2.5)
esse (0.2.6)
multi_json
thor (>= 0.19)

Expand Down
2 changes: 1 addition & 1 deletion lib/esse/cli/event_listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def elasticsearch_bulk(event)
type: (event[:request][:type] ? " for type #{colorize(event[:request][:type], :bold)}" : ''),
wait_interval: (event[:wait_interval].nonzero? ? " (wait interval #{event[:wait_interval]}s)" : ''),
newline: false,)
stats = event[:request][:body_stats].select { |_, v| v.nonzero? }.map do |type, count|
stats = event[:body_stats].select { |_, v| v.nonzero? }.map do |type, count|
"#{colorize(type, :bold)}: #{count} docs"
end
print_message(stats.join(', ') + '.')
Expand Down
2 changes: 1 addition & 1 deletion lib/esse/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Esse
VERSION = '0.2.5'
VERSION = '0.2.6'
end
4 changes: 2 additions & 2 deletions spec/esse/cli/event_listener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
{
runtime: 1.32,
wait_interval: wait_interval,
body_stats: body_stats,
request: {
index: 'index_name',
body_stats: body_stats
}
}
end
Expand Down Expand Up @@ -144,10 +144,10 @@
{
runtime: 1.32,
wait_interval: 0.0,
body_stats: {},
request: {
index: 'index_name',
type: 'document_type',
body_stats: [],
}
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
reset_config!
stub_index(:geos) do
repository :country do

end
end
end
Expand Down

0 comments on commit 23c5a1c

Please sign in to comment.