The spell checking dictionary should be built on startup with spellchecking
is enabled in the system.

First we defined the component in solrconfig.xml.  Notice how it has
buildOnCommit to tell it rebuild the dictionary.

  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="classname">solr.IndexBasedSpellChecker</str>
      <str name="field">field</str>
      <str name="spellcheckIndexDir">./spellchecker1</str>
      <str name="accuracy">0.5</str>
      <str name="buildOnCommit">true</str>
    </lst>
    <lst name="spellchecker">
      <str name="name">jarowinkler</str>
      <str name="field">field</str>
      <!-- Use a different Distance Measure -->
      <str 
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</s
tr>
      <str name="spellcheckIndexDir">./spellchecker2</str>
      <str name="accuracy">0.5</str>
      <str name="buildOnCommit">true</str>
    </lst>

Second we added the component to the dismax handler:
         <arr name="last-components">
               <str>spellcheck</str>
         </arr>

This seems to work for us.  Hope it helps

-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562


> From: Yao Ge <yao...@gmail.com>
> Reply-To: <solr-user@lucene.apache.org>
> Date: Tue, 2 Jun 2009 14:03:24 -0700 (PDT)
> To: <solr-user@lucene.apache.org>
> Subject: Re: spell checking
> 
> 
> Yes. I did. I was not able to grasp the concept of making spell checking
> work.
> For example, the wiki page says an spell check index need to be built. But
> did not say how to do it. Does Solr buid the index out of thin air? Or the
> index is buit from the main index? or index is built form a dictionary or
> word list?
> 
> Please help.
> 
> 
> Grant Ingersoll-6 wrote:
>> 
>> Have you gone through: http://wiki.apache.org/solr/SpellCheckComponent
>> 
>> 
>> On Jun 2, 2009, at 8:50 AM, Yao Ge wrote:
>> 
>>> 
>>> Can someone help providing a tutorial like introduction on how to get
>>> spell-checking work in Solr. It appears many steps are requires
>>> before the
>>> spell-checkering functions can be used. It also appears that a
>>> dictionary (a
>>> list of correctly spelled words) is required to setup the spell
>>> checker. Can
>>> anyone validate my impression?
>>> 
>>> Thanks.
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/spell-checking-tp23835427p23835427.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>> 
>> 
>> --------------------------
>> Grant Ingersoll
>> http://www.lucidimagination.com/
>> 
>> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)
>> using Solr/Lucene:
>> http://www.lucidimagination.com/search
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/spell-checking-tp23835427p23840843.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 

Reply via email to