lib/elasticity/index_mapper.rb in es-elasticity-0.6.0 vs lib/elasticity/index_mapper.rb in es-elasticity-0.6.1
- old
+ new
@@ -136,9 +136,10 @@
# Creates a instance of a document from a ElasticSearch hit data.
def map_hit(hit)
attrs = { _id: hit["_id"] }
attrs.merge!(_score: hit["_score"])
+ attrs.merge!(sort: hit["sort"])
attrs.merge!(hit["_source"]) if hit["_source"]
if hit["highlight"]
highlighted_attrs = attrs.dup
attrs_set = Set.new