<!-- Spell Check

    The spell check component can return a list of alternative spelling
    suggestions.

    http://wiki.apache.org/solr/SpellCheckComponent
 -->
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">

<str name="queryAnalyzerFieldType">textSpell</str>

<!-- Multiple "Spell Checkers" can be declared and used by this
     component
  -->

<!-- a spellchecker built from a field of the main index, and
     written to disk
  -->
<lst name="spellchecker">
  <str name="name">default</str>
  <str name="field">spell</str>
  <str name="spellcheckIndexDir">spellchecker</str>
  <str name="buildOnOptimize">true</str>
  <!-- uncomment this to require terms to occur in 1% of the documents in order to be included in the dictionary
    <float name="thresholdTokenFrequency">.01</float>
  -->
</lst>

<!--
  Adding German spellhecker index to our Solr index
  This also requires to enable the content in schema_extra_types.xml and schema_extra_fields.xml
-->
<!--
<lst name="spellchecker">
  <str name="name">spellchecker_de</str>
  <str name="field">spell_de</str>
  <str name="spellcheckIndexDir">./spellchecker_de</str>
  <str name="buildOnOptimize">true</str>
</lst>
-->

<!-- a spellchecker that uses a different distance measure -->
<!--
   <lst name="spellchecker">
     <str name="name">jarowinkler</str>
     <str name="field">spell</str>
     <str name="distanceMeasure">
       org.apache.lucene.search.spell.JaroWinklerDistance
     </str>
     <str name="spellcheckIndexDir">spellcheckerJaro</str>
   </lst>
 -->

<!-- a spellchecker that use an alternate comparator

     comparatorClass be one of:
      1. score (default)
      2. freq (Frequency first, then score)
      3. A fully qualified class name
  -->
<!--
   <lst name="spellchecker">
     <str name="name">freq</str>
     <str name="field">lowerfilt</str>
     <str name="spellcheckIndexDir">spellcheckerFreq</str>
     <str name="comparatorClass">freq</str>
     <str name="buildOnCommit">true</str>
  -->

<!-- A spellchecker that reads the list of words from a file -->
<!--
   <lst name="spellchecker">
     <str name="classname">solr.FileBasedSpellChecker</str>
     <str name="name">file</str>
     <str name="sourceLocation">spellings.txt</str>
     <str name="characterEncoding">UTF-8</str>
     <str name="spellcheckIndexDir">spellcheckerFile</str>
   </lst>
  -->
</searchComponent>
