On 9/13/06, Andre Basse <[EMAIL PROTECTED]> wrote:
Example:
<int name="franc">1</int> should be France
<int name="culturefestiv">1</int> should be Culture/Festivals

Hi Andre,

Field faceting works over the indexed terms... so you get back what
was indexed (word splitting, lowercasing, stemming, etc...  the
process is not generally reversible).

Perhaps you "classification" field should be of type "string" which is
indexed by not analyzed at all.  If you need some analysis (like if
you also want a query of "Festival" to match against
"Culture/Festivals", then you should index the field again as a
non-tokenized (non analyzed) "string" type.  This can be easily done
with an extra field definition and an a copyField statement in the
schema.xml

-Yonik

Please find details below.

Original XML
=========

<str name="section">Metro</str>

<arr name="classification">
<str>Culture/Film</str>
<str>Culture/Festivals</str>
</arr>

<arr name="geoloc">
<str>France</str>
<str>Sydney</str>
</arr>



SOLR response for the query
=====================
(http://192.168.157.128:8983/solr/select/?q=Bellucci&rows=0&facet=true&facet.limit=5&facet.field=section&facet.field=geoloc&facet.field=classification)

<response>
−
 <responseHeader>
<status>0</status>
<QTime>518</QTime>
</responseHeader>
<result numFound="2" start="0"/>
−
 <lst name="facet_counts">
<lst name="facet_queries"/>
−
 <lst name="facet_fields">
−
 <lst name="section">
<int name="metro">2</int>
<int name="busi">0</int>
<int name="career">0</int>
<int name="comput">0</int>
<int name="domain">0</int>
</lst>
−
 <lst name="geoloc">
<int name="franc">1</int>
<int name="sydney">1</int>
<int name="act">0</int>
<int name="adelaid">0</int>
<int name="afghanistan">0</int>
</lst>
−
 <lst name="classification">
<int name="cultur">1</int>
<int name="culturefestiv">1</int>
<int name="culturefilm">1</int>
<int name="festiv">1</int>
<int name="film">1</int>
</lst>
</lst>
</lst>
</response>


Any help is much appreciated!


Thanks,

Andre

Reply via email to