lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter McPeterson" <give2me...@hotmail.com>
Subject Faceted search problem
Date Wed, 17 Jan 2007 03:05:26 GMT
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


Mime
View raw message