FileBasedSpellChecker (Solr 3.6.2 API)
Keywords: org.apache.solr.spelling.FileBasedSpellChecker class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.spelling
Class FileBasedSpellChecker

    java.lang.Object
      org.apache.solr.spelling.SolrSpellChecker
          org.apache.solr.spelling.AbstractLuceneSpellChecker
              org.apache.solr.spelling.FileBasedSpellChecker

    public class FileBasedSpellChecker

extends AbstractLuceneSpellChecker

A spell checker implementation that loads words from a text file (one word per line).

Since:
  solr 1.3

Field Summary
`static String` | `SOURCE_FILE_CHAR_ENCODING`
`static String` | `WORD_FIELD_NAME`

Fields inherited from class org.apache.solr.spelling.AbstractLuceneSpellChecker
`accuracy, ACCURACY, COMPARATOR_CLASS, DEFAULT_SUGGESTION_COUNT, dictionary, FIELD, FREQ_COMP, index, INDEX_DIR, indexDir, LOCATION, SCORE_COMP, sd, sourceLocation, spellChecker, SPELLCHECKER_ARG_NAME, STRING_DISTANCE`

Fields inherited from class org.apache.solr.spelling.SolrSpellChecker
`analyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD_TYPE, fieldTypeName, name`

Constructor Summary
`FileBasedSpellChecker()`

Method Summary
`void` | `build(SolrCore core, SolrIndexSearcher searcher)` (re)Builds the spelling index.
`protected IndexReader` | `determineReader(IndexReader reader)` Override to return null, since there is no reader associated with a file based index
`String` | `getCharacterEncoding()`
`String` | `init(NamedList config, SolrCore core)`

Methods inherited from class org.apache.solr.spelling.AbstractLuceneSpellChecker
`getAccuracy, getField, getFieldTypeName, getIndexDir, getSourceLocation, getSpellChecker, getStringDistance, getSuggestions, getSuggestions, initIndex, reload`

Methods inherited from class org.apache.solr.spelling.SolrSpellChecker
`getDictionaryName, getQueryAnalyzer, getSuggestions, getSuggestions, getSuggestions`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SOURCE_FILE_CHAR_ENCODING

    public static final String SOURCE_FILE_CHAR_ENCODING

See Also:
  Constant Field Values

### WORD_FIELD_NAME

    public static final String WORD_FIELD_NAME

See Also:
  Constant Field Values

Constructor Detail

### FileBasedSpellChecker

    public FileBasedSpellChecker()

Method Detail

### init

    public String init(NamedList config,
                       SolrCore core)

  Overrides:
    `init` in class `AbstractLuceneSpellChecker`

### build

    public void build(SolrCore core,
                      SolrIndexSearcher searcher)

  Description copied from class: `SolrSpellChecker`
  (re)Builds the spelling index. May be a NOOP if the implementation doesn't require building, or can't be rebuilt.

  Specified by:
    `build` in class `SolrSpellChecker`

### determineReader

    protected IndexReader determineReader(IndexReader reader)

  Override to return null, since there is no reader associated with a file based index

  Overrides:
    `determineReader` in class `AbstractLuceneSpellChecker`

### getCharacterEncoding

    public String getCharacterEncoding()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD