class Xapian::ValueCountMatchSpy

Refer to the Xapian::ValueCountMatchSpy C++ API documentation for methods not specific to Ruby.

Public Instance Methods

top_values(maxvalues, &block) click to toggle source

Returns an Array of the top values seen, by frequency

# File xapian.rb, line 361
def top_values(maxvalues, &block)
  Xapian._safelyIterate(self._dangerous_top_values_begin(maxvalues),
                        self._dangerous_top_values_end(maxvalues),
                        lambda { |item| Xapian::Term.new(item.term, 0, item.termfreq) },
                        &block)
end
values(&block) click to toggle source

Returns an Array of all the values seen, in alphabetical order

# File xapian.rb, line 353
def values(&block)
  Xapian._safelyIterate(self._dangerous_values_begin(),
                        self._dangerous_values_end(),
                        lambda { |item| Xapian::Term.new(item.term, 0, item.termfreq) },
                        &block)
end