lib/mongoid/elasticsearch/response.rb in mongoid-elasticsearch-0.8.2 vs lib/mongoid/elasticsearch/response.rb in mongoid-elasticsearch-0.8.3
- old
+ new
@@ -102,10 +102,10 @@
def to_ary
results
end
def inspect
- "#<Mongoid::Elasticsearch::Response @size:#{size} @results:#{results.inspect} @error=#{success? ? "none" : error} @raw_response=#{raw_response}>"
+ "#<Mongoid::Elasticsearch::Response @size:#{@results.nil? ? 'not run yet' : size} @results:#{@results.inspect} @raw_response=#{@raw_response}>"
end
def count
# returns approximate counts, for now just using search_type: 'count',
# which is exact