diff --git a/lib/searchkick.rb b/lib/searchkick.rb index 89ccf69..b3ef4c4 100644 --- a/lib/searchkick.rb +++ b/lib/searchkick.rb @@ -40,7 +40,7 @@ module Searchkick @client ||= Elasticsearch::Client.new( url: ENV["ELASTICSEARCH_URL"], - transport_options: {request: {timeout: timeout}, headers: { content_type: 'application/json' }} + transport_options: {request: {timeout: timeout}, headers: {content_type: "application/json"}} ) do |f| f.use Searchkick::Middleware end diff --git a/lib/searchkick/query.rb b/lib/searchkick/query.rb index 7060530..0c0addb 100644 --- a/lib/searchkick/query.rb +++ b/lib/searchkick/query.rb @@ -29,7 +29,12 @@ module Searchkick @term = term @options = options @match_suffix = options[:match] || searchkick_options[:match] || "analyzed" - @type = @routing = @misspellings_below = @highlighted_fields = nil + + # prevent Ruby warnings + @type = nil + @routing = nil + @misspellings_below = nil + @highlighted_fields = nil prepare end -- libgit2 0.21.0