arelastic 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aefcfdc55dd8c8f5658800f98f9ee4c94997aa8f
4
- data.tar.gz: 6d43e6870c57ef8e0931314376a62d78e83b504c
3
+ metadata.gz: 19fd422e32ed10c3b06cf42899be823aa572f3f4
4
+ data.tar.gz: 788eb544a81da91a65167e9c191e32accddc4e01
5
5
  SHA512:
6
- metadata.gz: bec7b252b2b26e839134568d77b8a3485affd44dabd8c5226f5f17dcac9d70b9fa42f58dcb87dab44e8555aae88676396eaa77f7fceed165a6d8924fb8cfaf8d
7
- data.tar.gz: a95dfe3d216b26a227c9992896a0547d1a5e569aca087eb03272629842aafa6bc9f1190e74b956dc8efb7cbaac45286e41f49e1b26e90cdfe932e00555e8bfb7
6
+ metadata.gz: dff41431f73015db002c064f520afbc9ab0cd356001b096771b715017780633aa0ebee51c9b34ee49ff255f3ce3d4b48ad09b55dcd536914bf0c86620f2c0af8
7
+ data.tar.gz: d4f20c2d662d0d91b0f0041c211df3ef7c7d8d1027de11792a1071ea0e5c06f6e4457ea749da018bb6774e8a97683dd7fa320f14076e0e2a5448d528eab32bee
@@ -27,4 +27,4 @@ module Arelastic
27
27
  end
28
28
  end
29
29
  end
30
- end
30
+ end
@@ -0,0 +1,7 @@
1
+ module Arelastic
2
+ module Queries
3
+ class Wildcard < Arelastic::Queries::Query
4
+ binary 'wildcard'
5
+ end
6
+ end
7
+ end
@@ -10,4 +10,5 @@ require 'arelastic/queries/multi_match'
10
10
  require 'arelastic/queries/prefix'
11
11
  require 'arelastic/queries/query_string'
12
12
  require 'arelastic/queries/terms'
13
- require 'arelastic/queries/term'
13
+ require 'arelastic/queries/term'
14
+ require 'arelastic/queries/wildcard'
@@ -0,0 +1,15 @@
1
+ require 'helper'
2
+
3
+ class Arelastic::Queries::WildcardTest < MiniTest::Unit::TestCase
4
+ def test_as_elastic
5
+ expected = {"wildcard" => {"foo" => "bar*"}}
6
+
7
+ assert_equal expected, Arelastic::Queries::Wildcard.new("foo", "bar*").as_elastic
8
+ end
9
+
10
+ def test_with_options
11
+ expected = {"wildcard" => {"foo" => {"wildcard" => "ki*y", "boost" => 2.0}}}
12
+
13
+ assert_equal expected, Arelastic::Queries::Wildcard.new("foo", "wildcard" => "ki*y", "boost" => 2.0 ).as_elastic
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arelastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Higgins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Build Elastic Search queries with objects
14
14
  email: developer@matthewhiggins.com
@@ -86,6 +86,7 @@ files:
86
86
  - lib/arelastic/queries/query_string.rb
87
87
  - lib/arelastic/queries/term.rb
88
88
  - lib/arelastic/queries/terms.rb
89
+ - lib/arelastic/queries/wildcard.rb
89
90
  - lib/arelastic/searches.rb
90
91
  - lib/arelastic/searches/aggregations.rb
91
92
  - lib/arelastic/searches/facets.rb
@@ -110,7 +111,7 @@ files:
110
111
  - test/arelastic/builders/query_test.rb
111
112
  - test/arelastic/builders/search_test.rb
112
113
  - test/arelastic/builders/sort_test.rb
113
- - test/arelastic/facets/date_histogram.rb
114
+ - test/arelastic/facets/date_histogram_test.rb
114
115
  - test/arelastic/facets/facet_test.rb
115
116
  - test/arelastic/facets/histogram_test.rb
116
117
  - test/arelastic/facets/terms_test.rb
@@ -136,6 +137,7 @@ files:
136
137
  - test/arelastic/queries/multi_match_test.rb
137
138
  - test/arelastic/queries/query_string_test.rb
138
139
  - test/arelastic/queries/query_test.rb
140
+ - test/arelastic/queries/wildcard_test.rb
139
141
  - test/arelastic/searches/sort_test.rb
140
142
  - test/arelastic/sorts/sort_test.rb
141
143
  - test/helper.rb