elasticsearch-query-builder 0.5 → 0.6
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/Gemfile.lock +1 -1
- data/lib/elastic_search/query_builder.rb +15 -2
- data/lib/elastic_search/query_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c9f17360676e571b8dff13da887488a594d21a497a36ea79ef84f9a6c0c22b96
|
|
4
|
+
data.tar.gz: 763c7728c39a3c37318198dd33c443d8a3e096c2a1ceb890da5f3318056ca84d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d274ad8ae3e5a9f32c87c9251faf063740cf283dce0907195ac3ceae6a47ca0024231c2474b8703ea7fe7f6f486e90715801aea142431212a1c323e4fba37bf3
|
|
7
|
+
data.tar.gz: 60974f887cc58a6ec9d8816a73be0c64d5a1fee8ab336c0cc742b1d9193b00652eaaae9cf341bd5bc6f838f55e6c1f96bdc0c4118b198d924a73fa9530a2e7d5
|
data/Gemfile.lock
CHANGED
|
@@ -33,8 +33,9 @@ module ElasticSearch
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def initialize(opts: {}, client: nil, function_score: false)
|
|
36
|
+
def initialize(opts: {}, mopts: [], client: nil, function_score: false)
|
|
37
37
|
@opts = opts
|
|
38
|
+
@mopts = mopts
|
|
38
39
|
@function_score = function_score
|
|
39
40
|
@client = client
|
|
40
41
|
end
|
|
@@ -49,9 +50,21 @@ module ElasticSearch
|
|
|
49
50
|
client&.search(opts)&.results
|
|
50
51
|
end
|
|
51
52
|
|
|
53
|
+
def multisearch_results
|
|
54
|
+
raise 'client: should be set in order to fetch multisearch_results' unless client
|
|
55
|
+
|
|
56
|
+
client&.msearch(mopts)&.results
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def add_to_multisearch(index: {})
|
|
60
|
+
mopts << index
|
|
61
|
+
mopts << opts
|
|
62
|
+
@opts = {}
|
|
63
|
+
end
|
|
64
|
+
|
|
52
65
|
private
|
|
53
66
|
|
|
54
|
-
attr_accessor :opts, :client
|
|
67
|
+
attr_accessor :opts, :mopts, :client
|
|
55
68
|
|
|
56
69
|
def init_path(path)
|
|
57
70
|
return if path.size == 1 || initialized?(path)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elasticsearch-query-builder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.6'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kickser
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2019-
|
|
14
|
+
date: 2019-12-03 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: bundler
|