class LogStash::Search::Result
Attributes
duration[RW]
How long this query took, in seconds (or fractions of).
error_message[RW]
Error message, if any.
events[RW]
Array of LogStash::Event
of results
offset[RW]
Offset in search
total[RW]
Total records matched by this query, regardless of offset/count in query.
Public Class Methods
new(settings={})
click to toggle source
# File lib/logstash/search/result.rb, line 20 def initialize(settings={}) @events = [] @duration = nil @error_message = nil end
Public Instance Methods
error?()
click to toggle source
# File lib/logstash/search/result.rb, line 26 def error? return !@error_message.nil? end
to_json()
click to toggle source
# File lib/logstash/search/result.rb, line 30 def to_json return { "events" => @events, "duration" => @duration, "offset" => @offset, "total" => @total, }.to_json end