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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7e7753cff2fc354d081bacfe45d777e93bb6004e5754628da3d29c75efa8db8
4
- data.tar.gz: 66c434ad64c9bd403faeac6a122951dc2e559983498cccecf066b1a0f0bf137c
3
+ metadata.gz: c9f17360676e571b8dff13da887488a594d21a497a36ea79ef84f9a6c0c22b96
4
+ data.tar.gz: 763c7728c39a3c37318198dd33c443d8a3e096c2a1ceb890da5f3318056ca84d
5
5
  SHA512:
6
- metadata.gz: 7576a409e005a8601df181f2154aa062b355ed907a1236d1a669eea369053e5046b921ec89d4b5a9519835fb73f8486843ea197e0e583fb6c607beef8c7730e2
7
- data.tar.gz: 96aeb7a06dc364233f57615d7a5bb014425a6baa4c9d5ff672c01f3588fdf06b386031d6d424e2202ffc6d66fb230b29ec9599250ff9c54b3cb5e4756be2bd1a
6
+ metadata.gz: d274ad8ae3e5a9f32c87c9251faf063740cf283dce0907195ac3ceae6a47ca0024231c2474b8703ea7fe7f6f486e90715801aea142431212a1c323e4fba37bf3
7
+ data.tar.gz: 60974f887cc58a6ec9d8816a73be0c64d5a1fee8ab336c0cc742b1d9193b00652eaaae9cf341bd5bc6f838f55e6c1f96bdc0c4118b198d924a73fa9530a2e7d5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elasticsearch-query-builder (0.5)
4
+ elasticsearch-query-builder (0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ElasticSearch
4
4
  class QueryBuilder
5
- VERSION = '0.5'
5
+ VERSION = '0.6'
6
6
  end
7
7
  end
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.5'
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-11-13 00:00:00.000000000 Z
14
+ date: 2019-12-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler