Sha256: 211b1254089954d1003da7f4795d5a55ff9727d82d6a67b2f139abe473fc9255
Contents?: true
Size: 454 Bytes
Versions: 1
Compression:
Stored size: 454 Bytes
Contents
require "transformator/transformation/step" require_relative "../result_transformation" class Skala::ElasticsearchAdapter::Search::ResultTransformation:: SetHits < Transformator::Transformation::Step 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 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_hits.rb |