Hi all, I'm trying this solr ruby DSL called Flare/solrb and I don't really know how the faceted search works because I cant add whatever fields I want to to the index. This is currently not working:

conn = Solr::Connection.new('http://localhost:8983/solr')
doc = {:id => 1, :cat => 'eletronics', :features => 'video, music', :product => 'iPod'}
conn.send(Solr::Request::AddDocument.new(doc))
=> #<Solr::Response::AddDocument:0x554c2c @status_message="ERROR:unknown field 'cat'", @status_code="400", @raw_response="<result status=\"400\">ERROR:unknown field 'cat'</result>", @doc=<UNDEFINED> ... </>>

In case that if it was working, what I'd like to do is:
(pseudo-code)

request = Solr::Request::Standard.new(
:query => 'ipod',
:facets => {
 :fields => :cat
 }
)

Any help would be appreciated.

Peter

_________________________________________________________________
The MSN Entertainment Guide to Golden Globes is here. Get all the scoop. http://tv.msn.com/tv/globes2007/?icid=nctagline2

Reply via email to