I'd be curious to hear someone explain the mechanics of a String field.  I'm 
not entirely sure but I believe a String field is not tokenized and thus only 
exact matches work.  I think in your case you should be searching on your 
"name" field and faceting on the "actor" field.

-----Original Message-----
From: Senthil Kumar [mailto:mesent...@gmail.com] 
Sent: Friday, April 24, 2009 11:42 AM
To: solr-user@lucene.apache.org
Subject: Copy field : String Vs Text

Hi,
I have a requirement as below. The field needs to be available for facet.
The value will not be a single letter word. But I should be able to search
like a text fields.
<doc>
   <field name="actor">Silver stolen</field>
</doc>

Schema.xml
   <field name="actor"  type="string"  indexed="true"  stored="true"/>
   <field name="name"  type="text"  indexed="true"  stored="true"/>
   <copyField source="actor" dest="text"/>

I should be able to search for the word "silver" on actor field and should
get the result facet as "Silver Stolen". But I am getting the result onle if
I pass the complete "Silver Stolen" to the search query.

Please help me. Am I missing anything in the config?

thanks,
Senthil

Reply via email to