lib/elasticsearch/model/response.rb in elasticsearch-model-6.0.0 vs lib/elasticsearch/model/response.rb in elasticsearch-model-6.1.0

- old
+ new

@@ -58,11 +58,11 @@ end # Returns the statistics on shards # def shards - @shards ||= HashWrapper.new(raw_response['_shards']) + @shards ||= response['_shards'] end # Returns a Hashie::Mash of the aggregations # def aggregations @@ -74,10 +74,10 @@ def suggestions @suggestions ||= Suggestions.new(raw_response['suggest']) end def raw_response - @raw_response ||= search.execute! + @raw_response ||= @response ? @response.to_hash : search.execute! end end end end end