class Skala::ElasticsearchAdapter::Search::ResultTransformation::SetHits

Public Instance Methods

call() click to toggle source
# File lib/skala/elasticsearch_adapter/search/result_transformation/set_hits.rb, line 7
def call
  target.hits = source["hits"]["hits"].map do |_hit|
    {
      id: _hit["_id"],
      index: _hit["_index"],
      score: _hit["_score"],
      type: _hit["_type"],
      version: _hit["_version"]
    }
  end
end