elastic-util 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elastic_util.rb +3 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86b2acc63f7a0ca1b6b9664c0f88f124e87e93cd
4
- data.tar.gz: c96da7fa8d85ba9c2c3555d61165e4804ef6b6ea
3
+ metadata.gz: 9852a24a0dca9634cb63f202c778d29728daf036
4
+ data.tar.gz: 83940ff522b1928cafc944235a19a5b0d0e9dd40
5
5
  SHA512:
6
- metadata.gz: f34401fb4c4e3b103a1943fc6a5911a0ae8f6289679c86c403c4737fb60c62501cfc7d563b92ec44dc2d8be48136e8a2f35550f53f0cc5928e3b9097827d95b9
7
- data.tar.gz: ca82e26dc8f73e6ef7437655ded818727a65934797b94f79500db39021ed453362f5fa793ecb4c607721e30a173d5bb367e2311239f9dd53e2eb56de04862c23
6
+ metadata.gz: 888a0c6b7db27367f6b361be6db0a6ae8bbad12e4f87304d91259cc9cb18e2cf6028e5ae64a9b5f17a9401bd4af5123713748079d22da0578f36998ac4d782f3
7
+ data.tar.gz: c023e629c8d1b80d5c3ae4157c3baa0cde478a9671d8ca9b16871da40d237d79421b3a13158d425286a475c1e513b9f218582c35cb7e8418ad603f8ac434b4d3
data/lib/elastic_util.rb CHANGED
@@ -12,7 +12,7 @@ require 'fileutils'
12
12
  #
13
13
  module ElasticUtil
14
14
 
15
- VERSION = "0.1.3"
15
+ VERSION = "0.1.4"
16
16
 
17
17
  # The name of the data directory, relative to the user provided backup directory.
18
18
  DUMP_DIR = "es_data"
@@ -131,7 +131,7 @@ module ElasticUtil
131
131
  raise Error, "No scroll_id returned in response:\n#{response.inspect}" unless json_response['_scroll_id']
132
132
  scroll_id = json_response['_scroll_id']
133
133
  hits = json_response['hits']['hits']
134
- save_bulk_data(path, hits)
134
+ save_bulk_data(path, hits, nil, opts)
135
135
 
136
136
  file_index = 1
137
137
  # scroll requests
@@ -151,11 +151,7 @@ module ElasticUtil
151
151
  raise Error, "No scroll_id returned in response:\n#{response.inspect}\n#{response.body.to_s}" unless json_response['_scroll_id']
152
152
  scroll_id = json_response['_scroll_id']
153
153
  hits = json_response['hits']['hits']
154
- if file_index > 0
155
- save_bulk_data(path, hits, file_index)
156
- else
157
- save_bulk_data(path, hits)
158
- end
154
+ save_bulk_data(path, hits, file_index, opts)
159
155
  file_index += 1
160
156
  end
161
157
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Dickson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler