elasticsearch-dsl 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/dsl/search.rb +1 -1
- data/lib/elasticsearch/dsl/search/filters/range.rb +1 -0
- data/lib/elasticsearch/dsl/search/queries/match.rb +1 -0
- data/lib/elasticsearch/dsl/search/queries/range.rb +1 -0
- data/lib/elasticsearch/dsl/version.rb +1 -1
- data/test/unit/filters/range_test.rb +2 -1
- data/test/unit/queries/match_test.rb +6 -5
- data/test/unit/queries/range_test.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 055ca5865485c8f28e21edaab8e8cdf51d3f066b
|
4
|
+
data.tar.gz: 12b1be97400b1f7b4f0bca1ddb8b77731a7c6ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 091cda1600fb6848d0f1ebfc7be9fde2220f2600d073b896b37a091887527212f2506860f7dc9b1a6bf02e0271479dc46ab4cb8df9e8e7db9e806aa006cc2c36
|
7
|
+
data.tar.gz: f6afafb234bbad0efbd2f82a7da7d02766206d8b757e824f8dd17de2c1438db2e8d146c15ea424dc73fdf4609a59bab927720b6d6a3619baf4536f9cad1f1e04
|
@@ -19,8 +19,9 @@ module Elasticsearch
|
|
19
19
|
subject.gte 'bar'
|
20
20
|
subject.lte 'bar'
|
21
21
|
subject.time_zone 'bar'
|
22
|
+
subject.format 'bar'
|
22
23
|
|
23
|
-
assert_equal %w[ gte lte time_zone ],
|
24
|
+
assert_equal %w[ format gte lte time_zone ],
|
24
25
|
subject.to_hash[:range][:foo].keys.map(&:to_s).sort
|
25
26
|
|
26
27
|
assert_equal 'bar', subject.to_hash[:range][:foo][:gte]
|
@@ -39,13 +39,14 @@ module Elasticsearch
|
|
39
39
|
|
40
40
|
should "take a block" do
|
41
41
|
subject = Match.new :message do
|
42
|
-
query
|
43
|
-
operator
|
44
|
-
type
|
45
|
-
boost
|
42
|
+
query 'test'
|
43
|
+
operator 'and'
|
44
|
+
type 'phrase_prefix'
|
45
|
+
boost 2
|
46
|
+
fuzziness 'AUTO'
|
46
47
|
end
|
47
48
|
|
48
|
-
assert_equal({match: {message: {query: "test", operator: "and", type: 'phrase_prefix', boost: 2}}},
|
49
|
+
assert_equal({match: {message: {query: "test", operator: "and", type: 'phrase_prefix', boost: 2, fuzziness: 'AUTO'}}},
|
49
50
|
subject.to_hash)
|
50
51
|
end
|
51
52
|
|
@@ -19,17 +19,19 @@ module Elasticsearch
|
|
19
19
|
gte 10
|
20
20
|
lte 20
|
21
21
|
boost 2
|
22
|
+
format 'mm/dd/yyyy'
|
22
23
|
end
|
23
24
|
|
24
|
-
assert_equal({:range=>{:age=>{:gte=>10, :lte=>20, :boost=>2}}}, @subject.to_hash)
|
25
|
+
assert_equal({:range=>{:age=>{:gte=>10, :lte=>20, :boost=>2, :format=>'mm/dd/yyyy'}}}, @subject.to_hash)
|
25
26
|
end
|
26
27
|
|
27
28
|
should "take a method call" do
|
28
29
|
@subject = Range.new :age
|
29
30
|
@subject.gte 10
|
30
31
|
@subject.lte 20
|
32
|
+
@subject.format 'mm/dd/yyyy'
|
31
33
|
|
32
|
-
assert_equal({:range=>{:age=>{:gte=>10, :lte=>20}}}, @subject.to_hash)
|
34
|
+
assert_equal({:range=>{:age=>{:gte=>10, :lte=>20, :format=>'mm/dd/yyyy'}}}, @subject.to_hash)
|
33
35
|
end
|
34
36
|
|
35
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|