Interface SpellChecker
-
public interface SpellChecker
SpellChecker
defines an interface to run a spellchecker over a fulltext query statement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
check(QueryRootNode aqt)
Runs the spell checker over the first spellcheck relation query node in the abstract query tree and returns a suggestion in case this spellchecker thinks the words are misspelled.void
close()
Closes this spell checker and allows it to free resources.void
init(QueryHandler handler)
Initializes this spell checker with an abstract query tree.
-
-
-
Method Detail
-
init
void init(QueryHandler handler) throws IOException
Initializes this spell checker with an abstract query tree.- Parameters:
handler
- the query handler that created this spell checker.- Throws:
IOException
- if an error occurs while initializing the spell checker.
-
check
String check(QueryRootNode aqt) throws IOException
Runs the spell checker over the first spellcheck relation query node in the abstract query tree and returns a suggestion in case this spellchecker thinks the words are misspelled. If the spellchecker determines that the words are spelled correctlynull
is returned.- Parameters:
aqt
- the abstract query tree, which may contain a relation query node with a spellcheck operation.- Returns:
- a suggestion or
null
if this spell checker determines that the fulltext query statement is spelled correctly. - Throws:
IOException
-
close
void close()
Closes this spell checker and allows it to free resources.
-
-