Sha256: e096973978963d492441e833da936570d87d6ffe664529a2890405237c1ff474
Contents?: true
Size: 818 Bytes
Versions: 29
Compression:
Stored size: 818 Bytes
Contents
module ThinkingSphinx class BundledSearch attr_reader :client def initialize @searches = [] end def search(*args) @searches << ThinkingSphinx.search(*args) @searches.last.append_to client end def search_for_ids(*args) @searches << ThinkingSphinx.search_for_ids(*args) @searches.last.append_to client end def searches populate @searches end private def client @client ||= ThinkingSphinx::Configuration.instance.client end def populated? @populated end def populate return if populated? @populated = true client.run.each_with_index do |results, index| searches[index].populate_from_queue results end end end end
Version data entries
29 entries across 29 versions & 3 rubygems