elasticsearch-query-builder 0.6.5 → 0.6.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: 32fac396930dd20177e674f83b7fdda726fafc08cbd45317ad46cd3b085bb8e9
4
- data.tar.gz: ccbf17d8d00bc3c27f040118eb4c81060fe75affbfaf92519f4f7df36965abbe
3
+ metadata.gz: 23bc729624f735214cf04f8b103df9f09b98434020e1331c8e56aa5ba97e5ee4
4
+ data.tar.gz: f8850c14ea0c41edc4c37a2a114b0acd5d85538ced4ed50b5f2cec9add501d74
5
5
  SHA512:
6
- metadata.gz: b1d7d37c87b386cc9c2d7cbe618445b78563c3d921a067a4d79e1b2b90554bddbb1bfa5520eb3936c4644517ea5a2187293bd938135cf43771e178e6db538018
7
- data.tar.gz: 635b784302be3a34338eab13ed630aba560c8dcb4d7747368a8686ea488236c739469efb97e4b2b2aecb35a28b8fb2dabb835585609a15c4daf1b828d1384d50
6
+ metadata.gz: 74542a954265226e6a964428e7f4d67118d46d96df0636a9256f17b3ef4436271f083752fd6fb164f3e205bf5a22f244686e3db4aa085f2436eb88bf93897644
7
+ data.tar.gz: 47d725fd9043c209e1b7cb0654bf11ebd1713dafb701c656d304bef0af61bf6537cbeec62e7bbbfb75dff2892587a84bcab62dc553b07e72b4c3db4de81279f5
@@ -48,7 +48,7 @@ module ElasticSearch
48
48
  def results
49
49
  raise 'client: should be set in order to fetch results' unless client
50
50
 
51
- client&.search(opts)&.results
51
+ client&.search(opts.compact)&.results
52
52
  end
53
53
 
54
54
  def multisearch_results
@@ -59,7 +59,7 @@ module ElasticSearch
59
59
 
60
60
  def add_to_multisearch(index: {})
61
61
  mopts << index
62
- mopts << opts
62
+ mopts << opts.compact
63
63
  @opts = {}
64
64
  end
65
65
 
@@ -106,6 +106,7 @@ module ElasticSearch
106
106
  def add_clause(path, body)
107
107
  return if added?(path, body)
108
108
 
109
+ body = body.compact
109
110
  if !root_path?(path) && body.is_a?(Array)
110
111
  existing_content = opts.dig(*path) || []
111
112
  opts.dig(*path.first(path.size - 1)).store(path.last, body + existing_content)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ElasticSearch
4
4
  class QueryBuilder
5
- VERSION = '0.6.5'
5
+ VERSION = '0.6.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.6.5
4
+ version: 0.6.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-12-06 00:00:00.000000000 Z
14
+ date: 2019-12-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler