lib/ej/core.rb in ej-0.1.12 vs lib/ej/core.rb in ej-0.2.0

- old
+ new

@@ -146,11 +146,11 @@ end connect_with_retry { @client.bulk body: bulk_message unless bulk_message.empty? } end def copy(source, dest, query, per_size, scroll, dest_index, slice_max) - source_client = Elasticsearch::Client.new hosts: source - dest_client = Elasticsearch::Client.new hosts: dest + source_client = Elasticsearch::Client.new transport: Util.get_transport(Util.parse_hosts(source)) + dest_client = Elasticsearch::Client.new transport: Util.get_transport(Util.parse_hosts(dest)) parallel_array = slice_max ? slice_max.times.to_a : [0] Parallel.map(parallel_array, :in_processes=>parallel_array.size) do |slice_id| scroll_option = get_scroll_option(@index, query, per_size, scroll, slice_id, slice_max) r = connect_with_retry { source_client.search(scroll_option) }