Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change 
notification.

The following page has been changed by ShalinMangar:
http://wiki.apache.org/solr/SpellCheckComponent

The comment on the change is:
Added configuration section

------------------------------------------------------------------------------
  
  The SpellCheckComponent is designed to provide inline spell checking of 
queries without having to issue separate requests. It is currently not 
committed to Solr, but exists at 
[https://issues.apache.org/jira/browse/SOLR-572 SOLR-572]
  
+ The SpellCheckComponent uses the 
[http://wiki.apache.org/jakarta-lucene/SpellChecker Lucene SpellChecker] to 
give suggestion for given words.
+ 
+ [[Anchor(configuration)]]
+ = Configuration =
+ The first step to use SpellCheckComponent is to specify the source of words 
which should be used for suggestions in 
[http://wiki.apache.org/solr/SolrConfigXml solrconfig.xml]. The words can 
loaded from a field in Solr, text files or even from fields in arbitary Lucene 
indices. A sample configuration for loading words from a field in Solr looks 
like the following:
+ [[Anchor(solrFieldSpellChecker)]]
+ {{{
+ <searchComponent name="spellcheck" 
class="org.apache.solr.handler.component.SpellCheckComponent">
+     <!-- 
+          This section provides the default values for the request parameters.
+          These are overridden if the parameter is present in the request
+     -->
+     <lst name="defaults">
+       <!-- Only More Popular -->
+       <str name="spellcheck.onlyMorePopular">false</str>
+       <!-- Extended Results -->
+       <str name="spellcheck.extendedResults">false</str>
+       <!-- The number of suggestions to return -->
+       <str name="spellcheck.count">1</str>
+     </lst>
+     
+     <lst name="spellchecker">
+       <!-- Optional, it is required when more than one spellchecker is 
configured -->
+       <str name="name">default</str>
+       <!-- The classname is optional, defaults to IndexBasedSpellChecker -->
+       <str 
name="classname">org.apache.solr.spelling.IndexBasedSpellChecker</str>
+       <!--
+              Load tokens from the following field for spell checking, 
+              analyzer for the field's type as defined in schema.xml are used
+       -->
+       <str name="field">spell</str>
+       <!-- Optional, by default use in-memory index (RAMDirectory) -->
+       <str name="spellcheckIndexDir">./spellchecker</str>
+     </lst>
+ </searchComponent>
+ }}}
+ 
+ Multiple "spellchecker" instances can be configured in the same way. The 
currently available spellchecker implementations are:
+  * org.apache.solr.spelling.!IndexBasedSpellChecker
+  * org.apache.solr.spelling.!FileBasedSpellChecker
+ 
+ /!\ :TODO: /!\ Add more details
+ 
+ [[Anchor(reqParams)]]
  = Request Parameters =
  
  /!\ :TODO: /!\

Reply via email to