class Elasticsearch::Model::Response::Results
Encapsulates the collection of documents returned from Elasticsearch
Implements Enumerable and forwards its methods to the {#results} object.
Public Class Methods
new(klass, response, options={})
click to toggle source
@see Base#initialize
Calls superclass method
Elasticsearch::Model::Response::Base::new
# File lib/elasticsearch/model/response/results.rb, line 34 def initialize(klass, response, options={}) super end
Public Instance Methods
results()
click to toggle source
Returns the {Results} collection
# File lib/elasticsearch/model/response/results.rb, line 40 def results # TODO: Configurable custom wrapper response.response['hits']['hits'].map { |hit| Result.new(hit) } end
Also aliased as: records