The 'out of the box' usage of solr-ruby and Solr 1.1/1.2 is a bit frustrating. There are three different versions of the documentation that explains you how to add a new document:
=============== Using the default installation of Solr 1.1 and solr-ruby readme version: conn.add(:id => 123, :title_text => 'Lucene in Action') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title_text' wiki version: conn.add(:id => 123, :title_t => 'Lucene in Action') => false comment on connection.rb: conn.add(:id => 123, :title => 'Tlon, Uqbar, Orbis Tertius') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title' So basically none of the options above were able to insert the document in Solr 1.1 =============== Using the default installation of Solr 1.2 and solr-ruby readme version: conn.add(:id => 123, :title_text => 'Lucene in Action') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title_text' wiki version: conn.add(:id => 123, :title_t => 'Lucene in Action') => true comment on connection.rb: conn.add(:id => 123, :title => 'Tlon, Uqbar, Orbis Tertius') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title' Although the wiki version returned true, no records were found when searching for 'action' =============== Solr 1.1 using the schema.xml from solr-ruby/solr/conf Solr wouldn't even start properly =============== Solr 1.2 using the schema.xml from solr-ruby/solr/conf readme version: conn.add(:id => 123, :title_text => 'Lucene in Action') => true wiki version: conn.add(:id => 123, :title_t => 'Lucene in Action') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title_t' comment on connection.rb: conn.add(:id => 123, :title => 'Tlon, Uqbar, Orbis Tertius') SEVERE: org.apache.solr.core.SolrException: ERROR:unknown field 'title' The readme version worked as expected. So if this is really what users have to do to get it going, shouldn't there be an explanation for it? =============== Another thing, what's the reason for having two different versions of schema.xml? The one under solr-ruby/solr/conf is different than the one under solr-ruby/test/conf. Also, is there a place other than digging through the unit tests to see the options you can pass when adding a document or doing a search? Sorry for the bunch of question guys, I'm test-driving it before I implement acts_as_solr to use solr-ruby as the 'backend'. -- Thiago Jackiw acts_as_solr => http://acts-as-solr.railsfreaks.com
