Hi,

I am using the following fieldType to change the index of a given field:

    <fieldtype name="profanity" stored="false" indexed="true"
class="solr.TextField" >
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.KeepWordFilterFactory" words="profane-words.txt"
ignoreCase="true"/>
<filter class="solr.PatternReplaceFilterFactory"
pattern="^(.+)$"
replacement="YES"
replace="all"/>
      </analyzer>
  <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
      </analyzer>
    </fieldtype>


This is great for finding all things with or without profanity (as separate
queries), but I would like to get the value as part of a the query and let
the consumer of the call decide what to do with the data.

Is there a way to do this w/o having to instantiate a KeepWordFilterFactory
in the Java class that is responsible for inserting the document into Solr?
For example, I know that I can do this in Java code during the insert, but I
would rather get the indexed value (the one that shows up when faceting).

Please let me know if this is not clear.

Thanks,
Christian

Reply via email to