Hey there,
I am facing a problem related to query analysis and stopwords. Have some
ideas how to sort it out but would like to do it in the cleanest way
possible.
I am using dismax and I query to 3 fields. These fields are defined as
"text" this way:
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"
omitNorms="false">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ISOLatin1AccentFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ISOLatin1AccentFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
stopword.txt has the same words in the index and query analyzer. The thing
is, in some search requests (not all of them) want to add some extra
stopwords (at query time). The 3 fields would have the same extra stopwords.
I want these extra stopwords to be indexed in the index but that some
searches never find these words.
All documents would be indexed with the same analyzer but want a different
one at search time depending on a defined criteria. Before executing the
query I already now
How would be the best way to do this?
Thanks in advance