1

I'm trying to add spell checking to an existing Solr index.

I've added the following to the solrconfig.xml

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  <str name="queryAnalyzerFiedlType">textSpell</str>
  <lst name="spellchecker">
    <str name="name">my_spell</str>
    <str name="field">my_field</str>
    <str name="buildOnOptimize">true</str>
    <str nmae="spellcheckIndexDir">./spellchecker_my_spell</str>
  </lst>
</searchComponent>

When I try to build the index with http://<myserver>:4103/my_index/select?&spellcheck=true&spellcheck.build=true&spellcheck.dictionary=cn_spell

I don't find any evidence that any dictionary is being built, either in the response, or in the file system.

What am I missing?

4

1 回答 1

1

I forgot to add the query type to the query string. Adding &qt=dismax worked for me, since the spellcheck was the last-components of my dismax handler.

于 2012-06-13T01:22:23.763 回答