es-elasticity 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: ca2475391f7b89b60da9fb6895cc650b313b3479
4
- data.tar.gz: 2fcefccb5eca3b186c637ed6d44a607e856a72c5
3
+ metadata.gz: ed2432846e6d936d5b7ed4e777b55ee0dd8d759e
4
+ data.tar.gz: b51bb2084d453987fcff43e751ecec25ff62286a
5
5
  SHA512:
6
- metadata.gz: f1ccc19a7fd3a88eed123dd4dcae7f8abef9ac81810add15a76e0d9fee023ad16ac4b7d5e7db16ab614faf361cc66f35acd69bafd8c8f202e00ef5903a15bde2
7
- data.tar.gz: 391400cec0fe8093bd38b1400f23e4bbf5c96ce2ccc45238dd4da66493c451fd2c541a823d54b2940e252eccbcbc088e99022b8c6c11ef98a104d2e186fecf4d
6
+ metadata.gz: d639474dc06407cea519dee319025fdd4d23eecca222d86f76ffd092a41b55bb40d5f906b785f257d76ee9bfea89010461933920a76517d4c1ce0997a9964ffa
7
+ data.tar.gz: 99aa42e41b271174b5ee83586d5207f9f30f43de7e8b2bcfefc03049d2f8b6c4da3a7205f26e106314c9a8196fbc6728b4f1ab75852f28a6c48c141c638e297f
@@ -20,6 +20,10 @@ module Elasticity
20
20
  self.class.new(@index_name, @document_type, @body.deep_merge(body_changes))
21
21
  end
22
22
 
23
+ def to_count_args
24
+ { index: @index_name, type: @document_type, body: { query: @body.fetch(:query) }}
25
+ end
26
+
23
27
  def to_search_args
24
28
  { index: @index_name, type: @document_type, body: @body }
25
29
  end
@@ -110,7 +114,7 @@ module Elasticity
110
114
  end
111
115
 
112
116
  def count(args = {})
113
- @client.count(@search_definition.to_search_args.reverse_merge(args))["count"]
117
+ @client.count(@search_definition.to_count_args.reverse_merge(args))["count"]
114
118
  end
115
119
 
116
120
  def search_results
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler