我已经能够实现solr的单词特定建议或特定的短语,例如
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="0"
splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
以上代码有助于获得he => help, hell, hello
等单词建议
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
以上代码有助于获得he => hell boy the movie, hell with you
等整个短语
如何整合两者,以便he => hell, hello, hell boy the movie
等。