lib/elastic_mapper/search.rb in elastic_mapper-0.0.1 vs lib/elastic_mapper/search.rb in elastic_mapper-0.1.0
- old
+ new
@@ -53,10 +53,14 @@
else
return search(sanitize_query(query), opts, true)
end
end
- ordered_results(res.results.map(&:id))
+ Hashie::Mash.new({
+ documents: ordered_results(res.results.map(&:id)),
+ from: opts[:from],
+ total: res.total
+ })
end
# Create a query hash from a query string.
#
# @param query_string [String] the string query.