Sha256: e15530df924e6b12f6a450d7f7b88435c6863e93e41db5b96f27aefbbf1edb26

Contents?: true

Size: 296 Bytes

Versions: 1

Compression:

Stored size: 296 Bytes

Contents

require "transformator/transformation/step"
require_relative "../result_transformation"

class Skala::ElasticsearchAdapter::Search::ResultTransformation::
  SetTotalHits < Transformator::Transformation::Step

  def call
    target.total_hits = source.try(:[], "hits").try(:[], "total")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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