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 Apache Wiki <wi...@apache.org> on 2007/06/16 08:15:39 UTC

[Solr Wiki] Trivial Update of "solr-ruby" by ThiagoJackiw

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by ThiagoJackiw:
http://wiki.apache.org/solr/solr-ruby

The comment on the change is:
Updating usage info to work with Solr 1.2

------------------------------------------------------------------------------
  
  == Trying out solr-ruby ==
   * Install the solr-ruby gem {{{gem install solr-ruby}}} or check out solr-ruby from Subversion {{{svn co http://svn.apache.org/repos/asf/lucene/solr/trunk/client/ruby/solr-ruby}}}
-  * Launch Solr: {{{java -jar start.jar}}}
-    * You must have Solr already installed.  This example assumes you are using the example schema and configuration which ships with Solr 1.1.
+  * Launch Solr: {{{java -Dsolr.solr.home=<path to solr-ruby's solr directory> -jar start.jar}}}
+    * You must have Solr 1.2 already installed. This example assumes you are using the schema found under <path to solr-ruby/solr/conf directory> .
   * (in a separate shell) Launch irb (be sure to include the solr-ruby lib directory in your load path):
  
  {{{
@@ -19, +19 @@

    conn = Solr::Connection.new('http://localhost:8983/solr', :autocommit => :on)
  
    # add a document to the index
-   conn.add(:id => 123, :title_t => 'Lucene in Action')
+   conn.add(:id => 123, :title_text => 'Lucene in Action')
  
    # update the document
-   conn.update(:id => 123, :title_t => 'Solr in Action')
+   conn.update(:id => 123, :title_text => 'Solr in Action')
  
    # print out the first hit in a query for 'action'
    response = conn.query('action')