diff --git a/lib/logstash/search/result.rb b/lib/logstash/search/result.rb index 4ea59a37a..a273a955e 100644 --- a/lib/logstash/search/result.rb +++ b/lib/logstash/search/result.rb @@ -26,5 +26,14 @@ class LogStash::Search::Result def error? return !@error_message.nil? end + + def to_json + return { + "events" => @events, + "duration" => @duration, + "offset" => @offset, + "total" => @total, + }.to_json + end # def to_json end # class LogStash::Search::Result