Class: LogStash::Search::FacetResult

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/search/facetresult.rb

Defined Under Namespace

Classes: Entry, Histogram

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings = {}) ⇒ FacetResult

Returns a new instance of FacetResult.



15
16
17
18
19
# File 'lib/logstash/search/facetresult.rb', line 15

def initialize(settings={})
  @results = []
  @duration = nil
  @error_message = nil
end

Instance Attribute Details

#durationObject

How long this query took, in seconds (or fractions of).



10
11
12
# File 'lib/logstash/search/facetresult.rb', line 10

def duration
  @duration
end

#error_messageObject

Error message, if any.



13
14
15
# File 'lib/logstash/search/facetresult.rb', line 13

def error_message
  @error_message
end

#resultsObject

Array of LogStash::Search::FacetResult::Entry



7
8
9
# File 'lib/logstash/search/facetresult.rb', line 7

def results
  @results
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/logstash/search/facetresult.rb', line 21

def error?
  return !@error_message.nil?
end