def query(search, index = '*', comments = '')
      @queue.clear
      @queue << query_message(search, index, comments)
      self.run.first
    end
def query(search, index = '*', comments = '')
      @queue.clear
      @queue << query_message(search, index, comments)
      self.run.first
    end
Query the Sphinx daemon - defaulting to all indices, but you can specify
 a specific one if you wish. The search parameter should be a string
 following Sphinx's expectations.

 The object returned from this method is a hash with the following keys:

 * :matches
 * :fields
 * :attributes
 * :attribute_names
 * :words
 * :total
 * :total_found
 * :time
 * :status
 * :warning (if appropriate)
 * :error (if appropriate)

 The key <tt>:matches</tt> returns an array of hashes - the actual search
 results. Each hash has the document id (<tt>:doc</tt>), the result
 weighting (<tt>:weight</tt>), and a hash of the attributes for the
 document (<tt>:attributes</tt>).

 The <tt>:fields</tt> and <tt>:attribute_names</tt> keys return list of
 fields and attributes for the documents. The key <tt>:attributes</tt>
 will return a hash of attribute name and type pairs, and <tt>:words</tt>
 returns a hash of hashes representing the words from the search, with the
 number of documents and hits for each, along the lines of:

   results[:words]["Pat"] #=> {:docs => 12, :hits => 15}

 <tt>:total</tt>, <tt>:total_found</tt> and <tt>:time</tt> return the
 number of matches available, the total number of matches (which may be
 greater than the maximum available, depending on the number of matches
 and your sphinx configuration), and the time in milliseconds that the
 query took to run.

 <tt>:status</tt> is the error code for the query - and if there was a
 related warning, it will be under the <tt>:warning</tt> key. Fatal errors
 will be described under <tt>:error</tt>.