Thanks for your response. After making that change it seemed at first like it made no difference, after restarting the jetty server, and reindexing the test object, the display still shows:

<arr name="format_facet">
  <str>Video</str>
  <str>Streaming Video</str>
  <str>Online</str>
  <str>Gooberhead</str>
  <str>Book of the Month</str>
</arr>

But it turns out that I had been making an incorrect assumption. I was looking at the retruned stored values for the solr document, and seeing the "Gooberhead" entry listed, and thinking that the analyzer wasn't running. However as I have subsequently figured out, the analyzers are not run on the data that is to be stored, only on the data that is to being indexed. So after making your change to that field type statement, if I search for format_facet:Gooberhead I get results = 0 which is what I'd expect. But seeing that the unexpected values are still stored with the solr document, it seems that I will have to take a different approach.

Thanks again.

-Bob Haschart

Ahmet Arslan wrote:

I've added a new field type in schema.xml:

 <fieldType name="formatFacet"
class="solr.StrField" sortMissingLast="true"
omitNorms="true">
    <analyzer type="index">
         <tokenizer
class="solr.KeywordTokenizerFactory"/>
           <filter
class="solr.KeepWordFilterFactory" words="format_facet.txt"
ignoreCase="false" />
    </analyzer>
  </fieldType>


class="solr.StrField" should be class="solr.TextField"



Reply via email to