elastic 0.2.1 → 0.3.0
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/.travis.yml +1 -0
- data/lib/elastic/scroll.rb +12 -5
- data/lib/elastic/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 300fcf49159b96f8bf8effa5064b4210cc25b956e37024a097b633295eb1b945
|
|
4
|
+
data.tar.gz: 76f423a4a1cb831eaec79c4ca6c4f16fe1189c422308215d797678634e8afa48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab02d029f6d2ec592e400eee47dec95afde9b86ef98774a73ae5dbbba4cf5e3c3401502f562db521c9dd2acc18a96c123fea74ca72d3e0cc89b4b8600390e8a0
|
|
7
|
+
data.tar.gz: d27dc6e7947500b7c9668992437c3bf1a2628200bbb6f53b8595ad08f1ba2f3e766704f3a2e55af2d7dd37ad1a52f31a23858aa32e085ad4be5cbf2a68e81755
|
data/.travis.yml
CHANGED
data/lib/elastic/scroll.rb
CHANGED
|
@@ -2,13 +2,20 @@ module Elastic
|
|
|
2
2
|
class Scroll
|
|
3
3
|
include Enumerable
|
|
4
4
|
|
|
5
|
-
def initialize(client, index_name,
|
|
5
|
+
def initialize(client, index_name, options = {})
|
|
6
|
+
options = {
|
|
7
|
+
size: 1_000,
|
|
8
|
+
scroll: '5m',
|
|
9
|
+
body: {},
|
|
10
|
+
stored_fields: []
|
|
11
|
+
}.merge(options)
|
|
12
|
+
|
|
6
13
|
@client = client
|
|
7
14
|
@index_name = index_name
|
|
8
|
-
@size = size
|
|
9
|
-
@scroll = scroll
|
|
10
|
-
@body = body
|
|
11
|
-
@stored_fields = stored_fields
|
|
15
|
+
@size = options[:size]
|
|
16
|
+
@scroll = options[:scroll]
|
|
17
|
+
@body = options[:body]
|
|
18
|
+
@stored_fields = options[:stored_fields]
|
|
12
19
|
end
|
|
13
20
|
|
|
14
21
|
def each
|
data/lib/elastic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michał Szajbe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: elasticsearch
|
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
141
141
|
- !ruby/object:Gem::Version
|
|
142
142
|
version: '0'
|
|
143
143
|
requirements: []
|
|
144
|
-
rubygems_version: 3.
|
|
144
|
+
rubygems_version: 3.2.15
|
|
145
145
|
signing_key:
|
|
146
146
|
specification_version: 4
|
|
147
147
|
summary: Elasticsearch utilities
|