Hi,

I'm trying to prepare "narrow you search" functionality using facets. I do have some products and would like to use a brand as a narrow filter.

I did prepare in schema 2 fileds:

<fieldType name="brand_string" class="solr.TextField" sortMissingLast="true"
omitNorms="true" positionIncrementGap="100">
    <analyzer>
       <tokenizer class="solr.KeywordTokenizerFactory"/>
       <filter class="solr.TrimFilterFactory" />
     </analyzer>
   </fieldType>

<fieldType name="lower_string" class="solr.TextField" sortMissingLast="true"
omitNorms="true" positionIncrementGap="100">
    <analyzer>
    <tokenizer class="solr.KeywordTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory" />
       <filter class="solr.TrimFilterFactory" />
     </analyzer>
   </fieldType>


<field name="brand" type="brand_string" indexed="true" stored="true" default=
"none"/>
<field name="lbrand" type="lower_string" indexed="true" stored="false" defaul
t="none"/>

<copyField source="brand" dest="lbrand"/>

I'm using facet.field=lbrand and do get good results for eg: Geomax, GeoMax, GEOMAX all of them falls into "geomax". But when I'm filtering I do get strange results:

brand:geomax  gives numFound="0"
lbrand:geomax  gives numFound="57" (GEOMAX, GeoMag, Geomag)

How should I redefine brand to let narrow work correctly?

Tomek

Reply via email to