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 TristanVittorio:
http://wiki.apache.org/solr/SpellCheckerRequestHandler

The comment on the change is:
Updated and expanded section on 'termSourceField'

------------------------------------------------------------------------------
  
  === termSourceField ===
  
- The field in your schema that you want to be able to build your spell index 
on. This should be a field that uses a very simple FieldType without a lot of 
Analysis (ie: string).  The default field is 'word' and can be configured in 
SolrConfigXml.
+ The field in your schema that you want to be able to build your spell index 
on. This should be a field that uses a very simple FieldType without a lot of 
Analysis (e.g. string):
+ 
+ {{{
+ <add>
+   <doc>
+     <field name="word">Accountant</field>
+   </doc>
+   <doc>
+     <field name="word">Auditor</field>
+   </doc>
+   <doc>
+     <field name="word">Solicitor</field>
+   </doc>
+ </add>
+ }}}
+ 
+ In order to extract dictionary words from a field containing more than a 
single word (i.e. a text field), you should use the StandardTokenizer and 
StandardFilter which doesn't perform a great deal of processing on the field 
yet should provide acceptable results when used with the spell checker:
+ 
+ {{{
+ <fieldType name="spell" class="solr.TextField" positionIncrementGap="100">
+   <analyzer type="index">
+     <tokenizer class="solr.StandardTokenizerFactory "/>
+     <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords.txt"/>
+     <filter class="solr.StandardFilterFactory"/>
+     <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+   </analyzer>
+   <analyzer type="query">
+     <tokenizer class="solr.StandardTokenizerFactory"/>
+     <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" 
ignoreCase="true" expand="true"/>
+     <filter class="solr.StopFilterFactory" ignoreCase="true" words=" 
stopwords.txt"/>
+     <filter class="solr.StandardFilterFactory"/>
+     <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+   </analyzer>
+ </fieldType>
+ }}}
+ 
+ To automatically populate this field with the contents of another field when 
a document is added to the index, simply use a copyField:
+ 
+ {{{
+ <copyField source="content" dest="spell"/> 
+ }}}
+ 
+ The default field is 'word' and can be configured in SolrConfigXml.
  
  === spellcheckerIndexDir ===
  

Reply via email to