elastic-util 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elastic_util.rb +3 -7
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9852a24a0dca9634cb63f202c778d29728daf036
|
|
4
|
+
data.tar.gz: 83940ff522b1928cafc944235a19a5b0d0e9dd40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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-
|
|
11
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|