Sha256: 2c94b16f2ace537a10cc5be22152bc309755d9e796cb2f7c58207548f570cec0

Contents?: true

Size: 304 Bytes

Versions: 1

Compression:

Stored size: 304 Bytes

Contents

module Elastic::Results
  class Hit < Base
    attr_accessor :raw, :ref

    def initialize(_raw)
      @raw = _raw
    end

    def id
      @raw['_id']
    end

    def type
      @raw['_type']
    end

    def score
      @raw['_score']
    end

    def source
      @raw['_source']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elastic-rails-0.5.0 lib/elastic/results/hit.rb