The example in example/solr/conf/solrconfig.xml should show a couple of different options:

<searchComponent name="spellcheck" class="solr.SpellCheckComponent">

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

    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">spell</str>
      <str name="spellcheckIndexDir">./spellchecker1</str>

    </lst>
    <lst name="spellchecker">
      <str name="name">jarowinkler</str>
      <str name="field">spell</str>
      <!-- Use a different Distance Measure -->
<str name ="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</ str>
      <str name="spellcheckIndexDir">./spellchecker2</str>

    </lst>

    <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>

The first two are index based.

The spell field for the example is:
<field name="spell" type="textSpell" indexed="true" stored="true" multiValued="true"/>

HTH,
Grant

On Oct 9, 2008, at 9:38 AM, Matt Mitchell wrote:

I'm starting to implement the new SpellCheckComponent. The solr 1.3 dist example is using a file based dictionary, but I'd like to figure out the best way to populate the dictionary from our index. Should the spellcheck
field be multivalued?

Thanks,
Matt

--------------------------
Grant Ingersoll

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








Reply via email to