问题
My schema.xml is splitting product name and then uses RemoveDuplicate to remove duplicated words after split.
<fieldType name="type_name" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.PatternTokenizerFactory" pattern="\|| " />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
And in query analyzer I see that RemoveDuplicatesTokenFilterFactory did absolutely nothing to duplicated words. Why?
回答1:
If you read Wiki you will see that it only removes duplicates at the same position, which is not the case here.
来源:https://stackoverflow.com/questions/10329470/why-solr-removeduplicatestokenfilterfactory-dont-work