0
我正在從主從配置遷移到Solr Cloud。我要遷移到的Solr版本是4.4。我有兩個分別有1個副本的碎片。我正面臨分佈式拼寫建議的一個問題。我在請求處理程序中打開了拼寫組件。這個想法是將建議(如果有的話)作爲查詢響應的一部分。Solr Cloud中分佈式拼寫檢查問題
<str name="spellcheck">on</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.onlyMorePopular">false</str>
<str name="spellcheck.extendedResults">false</str>
<str name="spellcheck.count">1</str>
<str name="spellcheck.dictionary">default</str>
</lst>
<!-- append spellchecking to our list of components -->
<arr name="last-components">
<str>spellcheck</str>
</arr>
拼寫檢查搜索組件也很標準。
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">spell</str>
<!-- a spellchecker built from a field of the main index -->
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">text</str>
<str name="classname">solr.DirectSolrSpellChecker</str>
<str name="distanceMeasure">internal</str>
<float name="accuracy">0.5</float>
<int name="maxEdits">2</int>
<int name="minPrefix">1</int>
<int name="maxInspections">5</int>
<int name="minQueryLength">4</int>
<float name="maxQueryFrequency">0.01</float>
<!-- uncomment this to require suggestions to occur in 1% of the documents
<float name="thresholdTokenFrequency">.01</float>
-->
</lst>
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
<lst name="spellchecker">
<str name="name">wordbreak</str>
<str name="classname">solr.WordBreakSolrSpellChecker</str>
<str name="field">text</str>
<str name="combineWords">true</str>
<str name="breakWords">true</str>
<int name="maxChanges">10</int>
</lst>
</searchComponent>
我跑了spellcheck.build =真在兩個碎片。現在,如果我運行查詢,
http://testhost.com:8983/solr/browse?q=dellll
響應不會返回任何建議。但是,如果我明確地添加
DISTRIB =假,我得到的建議回
http://testhost.com:8983/solr/browse?q=dellll&distrib=false
這類需要分發的目的,我的查詢失敗的,我不希望有一個單獨的查詢只是一個拼寫檢查。
任何指針,將不勝感激。
- 感謝