Class: Esearch::Presenter::Hit

Inherits:
Esearch::Presenter show all
Defined in:
lib/esearch/presenter/hit.rb

Overview

Presenter for an hit

Instance Method Summary collapse

Instance Method Details

#_idString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return id

API:

  • private



57
# File 'lib/esearch/presenter/hit.rb', line 57

expose_primitive(:_id, :id)

#_indexString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return index name

API:

  • private



41
# File 'lib/esearch/presenter/hit.rb', line 41

expose_primitive(:_index, :index_name)

#_scoreFloat

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return score

API:

  • private



65
# File 'lib/esearch/presenter/hit.rb', line 65

expose_primitive(:_score, :score)

#_typeType

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return type name

API:

  • private



49
# File 'lib/esearch/presenter/hit.rb', line 49

expose_primitive(:_type, :type_name)

#fieldsHash?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return fields if present

API:

  • private



31
32
33
# File 'lib/esearch/presenter/hit.rb', line 31

def fields
  raw['fields']
end

#sourceHash?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return source field if present

API:

  • private



17
18
19
# File 'lib/esearch/presenter/hit.rb', line 17

def source
  raw['_source']
end