Using a Combination of Wildcards and Stemming

前端 未结 4 1890
闹比i
闹比i 2020-12-30 09:38

I\'m using a snowball analyzer to stem the titles of multiple documents. Everything works well, but their are some quirks.

Example:

A search for \"valv\", \

4条回答
  •  没有蜡笔的小新
    2020-12-30 10:03

    This is the simplest solution and it would work -

    Add solr.KeywordRepeatFilterFactory in your 'index' analyser.

    http://lucene.apache.org/core/4_8_0/analyzers-common/org/apache/lucene/analysis/miscellaneous/KeywordRepeatFilterFactory.html

    Also add RemoveDuplicatesTokenFilterFactory at the end of the 'index' analyzer

    Now in your index you will always have the stemmed and the non stemmed form for each token on the same position and you are good to go.

提交回复
热议问题