class ThinkingSphinx::BundledSearch

Attributes

client[R]

Public Class Methods

new() click to toggle source
# File lib/thinking_sphinx/bundled_search.rb, line 5
def initialize
  @searches = []
end

Public Instance Methods

search_for_ids(*args) click to toggle source
# File lib/thinking_sphinx/bundled_search.rb, line 14
def search_for_ids(*args)
  @searches << ThinkingSphinx.search_for_ids(*args)
  @searches.last.append_to client
end
searches() click to toggle source
# File lib/thinking_sphinx/bundled_search.rb, line 19
def searches
  populate
  @searches
end

Private Instance Methods

populate() click to toggle source
# File lib/thinking_sphinx/bundled_search.rb, line 34
def populate
  return if populated?

  @populated = true

  client.run.each_with_index do |results, index|
    searches[index].populate_from_queue results
  end
end
populated?() click to toggle source
# File lib/thinking_sphinx/bundled_search.rb, line 30
def populated?
  @populated
end