You need to use an untokenized field for facets. I can see we're going to get this question frequently now - it was mentioned earlier today in fact. You can use a <copyField> that is untokenized such that you can use one field for searching, and one for facets.

You are obviously using a stemming analyzer, and that is why France became franc, etc - just to explain why you are seeing those terms listed.

        Erik


On Sep 13, 2006, at 9:19 PM, Andre Basse wrote:

Hi all,

I just installed the nightly build to try the Faceted Searching . After some testing I discovered that some characters are missing in the result XML and that fields with "/" chars are sometimes split into two entries.

Example:
<int name="franc">1</int> should be France
<int name="culturefestiv">1</int> should be Culture/Festivals

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.f ield=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





********************************************************************** *********** The information contained in this e-mail message and any accompanying files is or may be confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail is subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error, please advise the sender immediately by return e-mail, or telephone and delete all copies. Fairfax does not guarantee the accuracy or completeness of any information contained in this e- mail or attached files. Internet communications are not secure, therefore Fairfax does not accept legal responsibility for the contents of this message or attached files. ********************************************************************** ***********


Reply via email to