Method: Elasticated::Results#text_for_inspect

Defined in:
lib/elasticated/results.rb

#text_for_inspectObject



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/elasticated/results.rb', line 63

def text_for_inspect
  text = "#{hits.total} hits"
  text = case documents.count
  when 0; "#{text}, no documents"
  when 1; "#{text}, 1 document"
  else; "#{text}, #{documents.count} documents"
  end
  text = aggregations ? "#{text}, with aggregations" : "#{text}, no aggregations"
  text = "#{text}, including scroll_id" if scroll_id
  text
end