arelastic 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module Arelastic
3
3
  class Query < Arelastic::Filters::Filter
4
4
  attr_reader :expr
5
5
  def initialize(expr)
6
- @expr = expr.is_a?(String) ? {'query_string' => expr} : expr
6
+ @expr = expr.is_a?(String) ? {'query_string' => {'query' => expr}} : expr
7
7
  end
8
8
 
9
9
  def as_elastic
@@ -8,7 +8,7 @@ class Arelastic::Filters::QueryTest < MiniTest::Spec
8
8
  end
9
9
 
10
10
  def test_with_string
11
- expected = {"query" => { "query_string" => "blue dog"}}
11
+ expected = {'query' => { 'query_string' => {'query' => 'blue dog'}}}
12
12
 
13
13
  assert_equal expected, Arelastic::Filters::Query.new("blue dog").as_elastic
14
14
  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.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: