Java org.apache.lucene.search.spell SpellChecker fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.search.spell SpellChecker fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.search.spell SpellChecker.

The text is from its open source code.

Field

StringF_WORD
Field name for each word in the ngram index.

Constructor

SpellChecker(Directory spellIndex)
Use the given directory as a spell checker index with a LevenshteinDistance as the default StringDistance .
SpellChecker(Directory spellIndex, StringDistance sd)
Use the given directory as a spell checker index.
SpellChecker(Directory spellIndex, StringDistance sd, Comparator comparator)
Use the given directory as a spell checker index with the given org.apache.lucene.search.spell.StringDistance measure and the given java.util.Comparator for sorting the results.

Method

voidclearIndex()
Removes all terms from the spell check index.
voidclose()
Close the IndexSearcher used by this SpellChecker
booleanexist(String word)
Check whether the word exists in the index.
StringDistancegetStringDistance()
Returns the StringDistance instance used by this SpellChecker instance.
voidindexDictionary(Dictionary dict, IndexWriterConfig config, boolean fullMerge)
Indexes the data from the given Dictionary .
voidsetAccuracy(float acc)
Sets the accuracy 0 < minScore < 1; default #DEFAULT_ACCURACY
voidsetSpellIndex(Directory spellIndexDir)
Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor.
voidsetStringDistance(StringDistance sd)
Sets the StringDistance implementation for this SpellChecker instance.
String[]suggestSimilar(String word, int numSug)
Suggest similar words.
String[]suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode)
Calls #suggestSimilar(String,int,IndexReader,String,SuggestMode,float) suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)
String[]suggestSimilar(String word, int numSug, float accuracy)
Suggest similar words.