es-elasticity 0.3.10 → 0.4.0
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/lib/elasticity/search.rb +1 -5
- data/lib/elasticity/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca2475391f7b89b60da9fb6895cc650b313b3479
|
|
4
|
+
data.tar.gz: 2fcefccb5eca3b186c637ed6d44a607e856a72c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1ccc19a7fd3a88eed123dd4dcae7f8abef9ac81810add15a76e0d9fee023ad16ac4b7d5e7db16ab614faf361cc66f35acd69bafd8c8f202e00ef5903a15bde2
|
|
7
|
+
data.tar.gz: 391400cec0fe8093bd38b1400f23e4bbf5c96ce2ccc45238dd4da66493c451fd2c541a823d54b2940e252eccbcbc088e99022b8c6c11ef98a104d2e186fecf4d
|
data/lib/elasticity/search.rb
CHANGED
|
@@ -20,10 +20,6 @@ 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
|
-
|
|
27
23
|
def to_search_args
|
|
28
24
|
{ index: @index_name, type: @document_type, body: @body }
|
|
29
25
|
end
|
|
@@ -114,7 +110,7 @@ module Elasticity
|
|
|
114
110
|
end
|
|
115
111
|
|
|
116
112
|
def count(args = {})
|
|
117
|
-
@client.count(@search_definition.
|
|
113
|
+
@client.count(@search_definition.to_search_args.reverse_merge(args))["count"]
|
|
118
114
|
end
|
|
119
115
|
|
|
120
116
|
def search_results
|
data/lib/elasticity/version.rb
CHANGED
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
|
+
version: 0.4.0
|
|
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-
|
|
11
|
+
date: 2015-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -241,4 +241,3 @@ test_files:
|
|
|
241
241
|
- spec/units/multi_search_spec.rb
|
|
242
242
|
- spec/units/search_spec.rb
|
|
243
243
|
- spec/units/strategies/single_index_spec.rb
|
|
244
|
-
has_rdoc:
|