3
目前正在Solr 3.6中使用Suggesters。我已經將Suggester配置爲提供外部字典源。如何在Suggester中忽略大小寫? Solr 3.6
solrconfig.xml中:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">suggest</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
<float name="threshold">0.005</float>
<str name="buildOnCommit">true</str>
<bool name="exactMatchFirst">true</bool>
<str name="sourceLocation">D:\source.txt</str>
</lst>
</searchComponent>
的Source.txt:
nokia 2
nokia 5233 3
nokia 5130 2
Symbian 1
samsung 6712 2
htc 2
HTC Wild 6
htc one 7
Nokia 1280 5
當我試圖用 「N」 來搜索,它表明我下面的結果
nokia 5233
nokia 5130
nokia
但結果不包含在「諾基亞1280」中。
可能是什麼原因? 如何在Suggestion中忽略大小寫?
您使用哪個字段的建議?請顯示其類型和schema.xml部分 – Mysterion
他根本沒有使用字段。他正在使用外部字典文件。 – waldol1