lib/elasticsearch/persistence/repository/response/results.rb in elasticsearch-persistence-2.0.1 vs lib/elasticsearch/persistence/repository/response/results.rb in elasticsearch-persistence-5.0.0
- old
+ new
@@ -16,11 +16,11 @@
# @param response [Hash] The full response returned from the Elasticsearch client
# @param options [Hash] Optional parameters
#
def initialize(repository, response, options={})
@repository = repository
- @response = Hashie::Mash.new(response)
+ @response = Elasticsearch::Model::HashWrapper.new(response)
@options = options
end
def method_missing(method_name, *arguments, &block)
results.respond_to?(method_name) ? results.__send__(method_name, *arguments, &block) : super
@@ -76,10 +76,10 @@
# results = repository.search query: { match: { title: 'fox dog' } },
# aggregations: { titles: { terms: { field: 'title' } } }
# results.response.aggregations.titles.buckets.map { |term| "#{term['key']}: #{term['doc_count']}" }
# # => ["brown: 1", "dog: 1", ...]
#
- # @return [Hashie::Mash]
+ # @return [Elasticsearch::Model::HashWrapper]
#
def response
@response
end
end