Sha256: 51b3d7823164c31d99102aeb48b21ad11a1087f29a414067edf2fcdb4590b8e3

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

require "skala/adapter/search/result"
require "transformator/transformation"
require_relative "../search"

class Skala::ElasticsearchAdapter::Search::ResultTransformation < Transformator::Transformation
  require_directory "#{File.dirname(__FILE__)}/result_transformation"

  attr_accessor :search_request

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

  sequence [
    SetFacets,
    SetHits,
    SetTotalHits
  ]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skala-1.1.0 lib/skala/elasticsearch_adapter/search/result_transformation.rb