Skip to content

Commit

Permalink
fix bug in remap to use scan api properly (#45)
Browse files Browse the repository at this point in the history
Because of a bug in elasticsearch ruby gem the scan id must be passed
directly in the body.
elastic/elasticsearch-ruby#423
  • Loading branch information
DanielNill authored Jun 7, 2017
1 parent 8ea7033 commit becf099
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v0.8.3
- fix remap method to use the scan api properly.
v0.8.2
- fix scan api to work with more recent versions of elasticsearch ruby.
v0.8.1
Expand Down
2 changes: 1 addition & 1 deletion lib/elasticity/strategies/alias_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def remap(index_def)
end

@client.bulk(body: ops) unless ops.empty?
cursor = @client.scroll(scroll_id: cursor['_scroll_id'], scroll: '1m')
cursor = @client.scroll(scroll_id: cursor['_scroll_id'], scroll: '1m', body: { scroll_id: cursor["_scroll_id"] })
end

# Update aliases to only point to the new index.
Expand Down
2 changes: 1 addition & 1 deletion lib/elasticity/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Elasticity
VERSION = "0.8.2"
VERSION = "0.8.3"
end

0 comments on commit becf099

Please sign in to comment.