Class: Elastic::Shims::Populating

Inherits:
Base
  • Object
show all
Defined in:
lib/elastic/shims/populating.rb

Instance Attribute Summary

Attributes inherited from Base

#child

Instance Method Summary collapse

Methods inherited from Base

#traverse

Methods included from Elastic::Support::Traversable

#pick_nodes, #traverse

Constructor Details

#initialize(_index, _config, _child) ⇒ Populating

Returns a new instance of Populating.



3
4
5
6
7
# File 'lib/elastic/shims/populating.rb', line 3

def initialize(_index, _config, _child)
  super _child
  @index = _index
  @config = _config
end

Instance Method Details

#handle_result(_raw, _formatter) ⇒ Object



14
15
16
17
18
# File 'lib/elastic/shims/populating.rb', line 14

def handle_result(_raw, _formatter)
  result = super
  populate result
  result
end

#render(_options = {}) ⇒ Object



9
10
11
12
# File 'lib/elastic/shims/populating.rb', line 9

def render(_options = {})
  disable_hits_source if populate_by_id?
  super
end