search_flip 2.3.1 → 2.3.2
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 +2 -1
- data/CHANGELOG.md +4 -0
- data/README.md +17 -0
- data/lib/search_flip/aggregation.rb +1 -1
- data/lib/search_flip/bulk.rb +1 -1
- data/lib/search_flip/criteria.rb +2 -2
- data/lib/search_flip/http_client.rb +5 -1
- data/lib/search_flip/index.rb +1 -1
- data/lib/search_flip/version.rb +1 -1
- data/lib/search_flip.rb +1 -0
- data/search_flip.gemspec +1 -0
- metadata +17 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b35fa0a26656805611e1f40be7cf17a80a9e5b307b45eeecca1fe7307ab4c3ec
|
|
4
|
+
data.tar.gz: 20103b3bf9a10635d9b43885895b9f046ffc72b36c7b1ebd125d0033571a7d6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f894a1fbdc3f62adc190da4de5446a41dfe69a4f4cc717cba45660719790f79a65dad0d4016aed0a4fd197bd90bc71d62b2a9e99efaf3767feec95739abdfc1
|
|
7
|
+
data.tar.gz: 480eb7a2c092bd2f6dd53ffb11aeb888310ba2cf0e73827532e9b29bc151462748a0b69f09a02165785eb9d554c4b1d1677c97dc03211d3026612b2b008d662a
|
data/.travis.yml
CHANGED
|
@@ -7,9 +7,10 @@ env:
|
|
|
7
7
|
- ES_IMAGE=elasticsearch:5.4
|
|
8
8
|
- ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:6.7.0
|
|
9
9
|
- ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.0.0
|
|
10
|
-
- ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.
|
|
10
|
+
- ES_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:7.4.0
|
|
11
11
|
rvm:
|
|
12
12
|
- ruby-2.6.2
|
|
13
|
+
- ruby-2.7.1
|
|
13
14
|
before_install:
|
|
14
15
|
- docker-compose up -d
|
|
15
16
|
- sleep 10
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -263,6 +263,23 @@ CommentIndex.bulk do |indexer|
|
|
|
263
263
|
end
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
+
When indexing or deleting documents, you can pass options to control the bulk
|
|
267
|
+
indexing and you can use all options provided by the [Bulk API]:
|
|
268
|
+
|
|
269
|
+
```ruby
|
|
270
|
+
CommentIndex.import(Comment.first, { bulk_limit: 1_000 }, op_type: "create", routing: "routing_key")
|
|
271
|
+
|
|
272
|
+
# or directly
|
|
273
|
+
|
|
274
|
+
CommentIndex.create(Comment.first, { bulk_max_mb: 100 }, routing: "routing_key")
|
|
275
|
+
CommentIndex.update(Comment.first, ...)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Checkout the elasticsearch [Bulk API] docs for more info as well as
|
|
279
|
+
[SearchFlip::Bulk](http://www.rubydoc.info/github/mrkamel/search_flip/SearchFlip/Bulk)
|
|
280
|
+
for a complete list of available options to control the bulk indexing of
|
|
281
|
+
SearchFlip.
|
|
282
|
+
|
|
266
283
|
## Working with Elasticsearch Aliases
|
|
267
284
|
|
|
268
285
|
You can use and manage Elasticsearch Aliases like the following:
|
data/lib/search_flip/bulk.rb
CHANGED
data/lib/search_flip/criteria.rb
CHANGED
|
@@ -251,7 +251,7 @@ module SearchFlip
|
|
|
251
251
|
#
|
|
252
252
|
# @return [SearchFlip::Criteria] Simply returns self
|
|
253
253
|
|
|
254
|
-
def with_settings(*args)
|
|
254
|
+
ruby2_keywords def with_settings(*args)
|
|
255
255
|
fresh.tap do |criteria|
|
|
256
256
|
criteria.target = target.with_settings(*args)
|
|
257
257
|
end
|
|
@@ -886,7 +886,7 @@ module SearchFlip
|
|
|
886
886
|
target.respond_to?(name, *args)
|
|
887
887
|
end
|
|
888
888
|
|
|
889
|
-
def method_missing(name, *args, &block)
|
|
889
|
+
ruby2_keywords def method_missing(name, *args, &block)
|
|
890
890
|
if target.respond_to?(name)
|
|
891
891
|
merge(target.send(name, *args, &block))
|
|
892
892
|
else
|
|
@@ -26,17 +26,21 @@ module SearchFlip
|
|
|
26
26
|
client.request = request.send(method, *args)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
|
+
|
|
30
|
+
ruby2_keywords method
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
[:get, :post, :put, :delete, :head].each do |method|
|
|
32
34
|
define_method method do |*args|
|
|
33
35
|
execute(method, *args)
|
|
34
36
|
end
|
|
37
|
+
|
|
38
|
+
ruby2_keywords method
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
private
|
|
38
42
|
|
|
39
|
-
def execute(method, *args)
|
|
43
|
+
ruby2_keywords def execute(method, *args)
|
|
40
44
|
response = request.send(method, *args)
|
|
41
45
|
|
|
42
46
|
raise SearchFlip::ResponseError.new(code: response.code, body: response.body.to_s) unless response.status.success?
|
data/lib/search_flip/index.rb
CHANGED
data/lib/search_flip/version.rb
CHANGED
data/lib/search_flip.rb
CHANGED
data/search_flip.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: search_flip
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Benjamin Vetter
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -122,6 +122,20 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: ruby2_keywords
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - ">="
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0'
|
|
132
|
+
type: :runtime
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
125
139
|
- !ruby/object:Gem::Dependency
|
|
126
140
|
name: hashie
|
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -233,8 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
233
247
|
- !ruby/object:Gem::Version
|
|
234
248
|
version: '0'
|
|
235
249
|
requirements: []
|
|
236
|
-
|
|
237
|
-
rubygems_version: 2.7.3
|
|
250
|
+
rubygems_version: 3.1.2
|
|
238
251
|
signing_key:
|
|
239
252
|
specification_version: 4
|
|
240
253
|
summary: Full-Featured Elasticsearch Ruby Client with a Chainable DSL
|