You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2008/02/13 12:07:52 UTC

svn commit: r627357 - /lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb

Author: ehatcher
Date: Wed Feb 13 03:07:51 2008
New Revision: 627357

URL: http://svn.apache.org/viewvc?rev=627357&view=rev
Log:
SOLR-473: RDoc patch contributed Chris Kline

Modified:
    lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb

Modified: lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb?rev=627357&r1=627356&r2=627357&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/connection.rb Wed Feb 13 03:07:51 2008
@@ -78,12 +78,29 @@
   #   conn.query('borges') do |hit|
   #     puts hit
   #   end
+  #
+  # options include:
+  # 
+  #   :sort, :default_field, :rows, :filter_queries, :debug_query,
+  #   :explain_other, :facets, :highlighting, :mlt,
+  #   :operator         => :or / :and
+  #   :start            => defaults to 0
+  #   :field_list       => array, defaults to ["*", "score"]
 
   def query(query, options={}, &action)
     # TODO: Shouldn't this return an exception if the Solr status is not ok?  (rather than true/false).
     create_and_send_query(Solr::Request::Standard, options.update(:query => query), &action)
   end
   
+  # performs a dismax search and returns a Solr::Response::Standard
+  #
+  #   response = conn.search('borges')
+  # 
+  # options are same as query, but also include:
+  # 
+  #   :tie_breaker, :query_fields, :minimum_match, :phrase_fields,
+  #   :phrase_slop, :boost_query, :boost_functions
+
   def search(query, options={}, &action)
     create_and_send_query(Solr::Request::Dismax, options.update(:query => query), &action)
   end