class LogStash::Search::Base

Public Instance Methods

count(query) click to toggle source

Count the results given by a query.

# File lib/logstash/search/base.rb, line 35
def count(query)
  raise "The class #{self.class.name} must implement the 'count' method."
end
histogram(query, field, interval=nil) click to toggle source

Yields a histogram by field of a query.

This method is async. You should expect a block to be passed and therefore should yield a result, not return one.

Implementations should yield a LogStash::Search::FacetResult::Histogram

# File lib/logstash/search/base.rb, line 24
def histogram(query, field, interval=nil)
  raise "The class #{self.class.name} must implement the 'histogram' method."
end