: writer, I notice a space at the end. I can fix this issue by triming all my
: values before sening them to solr :-)

The built in Field Faceting works on the indexed values, so Solr can solve
this for you if you use something like this for your facet field type...

   <fieldType name="facetString" class="solr.TextField" omitNorms="true">
     <analyzer>
      <!-- KeywordTokenizer does no actual tokenizing, so the entire
           input string is preserved as a single token
        -->
      <tokenizer class="solr.KeywordTokenizerFactory"/>
      <!-- The LowerCase TokenFilter does what you expect, which can be
           when you want your sorting to be case insensitive
        -->
      <filter class="solr.LowerCaseFilterFactory" />
      <!-- The TrimFilter removes any leading or trailing whitespace -->
      <filter class="solr.TrimFilterFactory" />
     </analyzer>
   </fieldType>



-Hoss

Reply via email to