我正在使用solr拼寫檢查俄語。當你用西里爾文字符輸入時,一切都可以,但是當你用拉丁字符輸入時,它不起作用。Solr俄語拼寫檢查
我想要的拼寫檢查正確,當你與西里爾字符輸入,且當你拉丁字符打字。與對應文字與西里爾文字符。
For example, when you type:
телевидениеее or televidenieee
It should correct to:
телевидение
schema.xml中:
<fieldType name="spell_text" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<charFilter class="solr.PatternReplaceCharFilterFactory" pattern="[,.;:]" replacement=" "/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="'s" replacement=""/>
<filter class="solr.ShingleFilterFactory" maxShingleSize="2" outputUnigrams="true"/>
<filter class="solr.LengthFilterFactory" min="3" max="256" />
</analyzer>
</fieldType>
solrconfig.xml中
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">spellcheck</str>
<str name="classname">solr.IndexBasedSpellChecker</str>
<str name="buildOnCommit">true</str>
<str name="buildOnOptimize">true</str>
<str name="spellcheckIndexDir">./spellchecker</str>
<str name="accuracy">0.75</str>
</lst>
<lst name="spellchecker">
<str name="name">wordbreak</str>
<str name="field">spellcheck</str>
<str name="classname">solr.WordBreakSolrSpellChecker</str>
<str name="combineWords">false</str>
<str name="breakWords">true</str>
<int name="maxChanges">1</int>
</lst>
</searchComponent>
感謝您的幫助
只是爲了澄清 - 你想有'televidenieee'音譯爲'телевидениеее'然後拼寫檢查固定'телевидение ',對嗎? – rchukh
是的,你說得對。 – KiraLT
你還可以分享你使用的'requestHandler'嗎? – cheffe