Class: Skala::ElasticsearchAdapter::Search::ResultTransformation

Inherits:
Transformator::Transformation
  • Object
show all
Defined in:
lib/skala/elasticsearch_adapter/search/result_transformation.rb

Defined Under Namespace

Classes: SetFacets, SetHits, SetTotalHits

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#search_requestObject

Returns the value of attribute search_request.



8
9
10
# File 'lib/skala/elasticsearch_adapter/search/result_transformation.rb', line 8

def search_request
  @search_request
end

Instance Method Details

#call(source, options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/skala/elasticsearch_adapter/search/result_transformation.rb', line 10

def call(source, options = {})
  options[:target] ||= Skala::Adapter::Search::Result.new(source: source)
  @search_request = options[:search_request]
  super(source, options)
end