org.apache.jackrabbit.core.query.lucene
Interface SpellChecker


public interface SpellChecker

SpellChecker defines an interface to run a spellchecker over a fulltext query statement.


Method Summary
 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 correctly null 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.



Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.