class ElasticSearch::Api::Hit

Public Class Methods

new(hit) click to toggle source
Calls superclass method
# File lib/elasticsearch/client/hits.rb, line 8
def initialize(hit)
  hit = hit.dup
  hit.merge!(hit["_source"]) if hit["_source"]
  hit["id"] ||= hit["_id"]
  super(hit)
end

Public Instance Methods

attributes() click to toggle source
# File lib/elasticsearch/client/hits.rb, line 15
def attributes
  @table
end