arelastic 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ require 'arelastic/filters/missing'
10
10
  require 'arelastic/filters/not'
11
11
  require 'arelastic/filters/or'
12
12
  require 'arelastic/filters/prefix'
13
+ require 'arelastic/filters/query'
13
14
  require 'arelastic/filters/range'
14
15
  require 'arelastic/filters/term'
15
16
  require 'arelastic/filters/terms'
@@ -0,0 +1,7 @@
1
+ module Arelastic
2
+ module Filters
3
+ class Query < Arelastic::Filters::Filter
4
+ unary 'query'
5
+ end
6
+ end
7
+ end
File without changes
@@ -0,0 +1,9 @@
1
+ require 'helper'
2
+
3
+ class Arelastic::Filters::QueryTest < MiniTest::Spec
4
+ def test_as_elastic
5
+ expected = {"query" => { "match" => {"message" => "this is a test"} }}
6
+
7
+ assert_equal expected, Arelastic::Filters::Query.new(Arelastic::Queries::Match.new('message', 'this is a test')).as_elastic
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arelastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-21 00:00:00.000000000 Z
12
+ date: 2012-10-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Build Elastic Search queries with objects
15
15
  email: developer@matthewhiggins.com
@@ -44,6 +44,7 @@ files:
44
44
  - lib/arelastic/filters/not.rb
45
45
  - lib/arelastic/filters/or.rb
46
46
  - lib/arelastic/filters/prefix.rb
47
+ - lib/arelastic/filters/query.rb
47
48
  - lib/arelastic/filters/range.rb
48
49
  - lib/arelastic/filters/term.rb
49
50
  - lib/arelastic/filters/terms.rb
@@ -86,8 +87,10 @@ files:
86
87
  - test/arelastic/filters/geo_distance_test.rb
87
88
  - test/arelastic/filters/ids_test.rb
88
89
  - test/arelastic/filters/match_all_test.rb
90
+ - test/arelastic/filters/match_test.rb
89
91
  - test/arelastic/filters/missing_test.rb
90
92
  - test/arelastic/filters/not_test.rb
93
+ - test/arelastic/filters/query_test.rb
91
94
  - test/arelastic/nodes/node_test.rb
92
95
  - test/arelastic/queries/filtered_test.rb
93
96
  - test/arelastic/queries/match_all_test.rb