org.compass.core.lucene.engine.spellcheck
Class DefaultLuceneSearchEngineSpellCheckSuggestBuilder

java.lang.Object
  extended by org.compass.core.lucene.engine.spellcheck.DefaultLuceneSearchEngineSpellCheckSuggestBuilder
All Implemented Interfaces:
SearchEngineSpellCheckSuggestBuilder

public class DefaultLuceneSearchEngineSpellCheckSuggestBuilder
extends Object
implements SearchEngineSpellCheckSuggestBuilder

Author:
kimchy

Constructor Summary
DefaultLuceneSearchEngineSpellCheckSuggestBuilder(String word, InternalLuceneSearchEngineSpellCheckManager spellCheckerManager)
           
 
Method Summary
 SearchEngineSpellCheckSuggestBuilder accuracy(float accuracy)
          Sets the accuracy.
 SearchEngineSpellCheckSuggestBuilder aliases(String... aliases)
          Narrows down the spell check suggestions to the given sub aliases.
 SearchEngineSpellCheckSuggestBuilder morePopular(boolean morePopular)
          Return only the suggest words that are more frequent than the searched word.
 SearchEngineSpellCheckSuggestBuilder numberOfSuggestions(int numberOfSuggestions)
          Restricts the number of suggestions.
 SearchEngineSpellCheckSuggestBuilder restrictToProperty(String restrictToProperty)
          Restricts the suggested words to the words present in this property.
 SearchEngineSpellCheckSuggestBuilder subIndexes(String... subIndexes)
          Narrows down the spell check suggestions to the given sub indexes.
 SearchEngineSpellSuggestions suggest()
          Returns the given suggestions for the word.
 SearchEngineSpellCheckSuggestBuilder types(Class... types)
          Narrows down the spell check suggestions to the given types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLuceneSearchEngineSpellCheckSuggestBuilder

public DefaultLuceneSearchEngineSpellCheckSuggestBuilder(String word,
                                                         InternalLuceneSearchEngineSpellCheckManager spellCheckerManager)
Method Detail

subIndexes

public SearchEngineSpellCheckSuggestBuilder subIndexes(String... subIndexes)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Narrows down the spell check suggestions to the given sub indexes.

Specified by:
subIndexes in interface SearchEngineSpellCheckSuggestBuilder

aliases

public SearchEngineSpellCheckSuggestBuilder aliases(String... aliases)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Narrows down the spell check suggestions to the given sub aliases.

Specified by:
aliases in interface SearchEngineSpellCheckSuggestBuilder

types

public SearchEngineSpellCheckSuggestBuilder types(Class... types)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Narrows down the spell check suggestions to the given types.

Specified by:
types in interface SearchEngineSpellCheckSuggestBuilder

numberOfSuggestions

public SearchEngineSpellCheckSuggestBuilder numberOfSuggestions(int numberOfSuggestions)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Restricts the number of suggestions. Defaults to 1.

Specified by:
numberOfSuggestions in interface SearchEngineSpellCheckSuggestBuilder

restrictToProperty

public SearchEngineSpellCheckSuggestBuilder restrictToProperty(String restrictToProperty)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Restricts the suggested words to the words present in this property.

Specified by:
restrictToProperty in interface SearchEngineSpellCheckSuggestBuilder

morePopular

public SearchEngineSpellCheckSuggestBuilder morePopular(boolean morePopular)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Return only the suggest words that are more frequent than the searched word.

Specified by:
morePopular in interface SearchEngineSpellCheckSuggestBuilder

accuracy

public SearchEngineSpellCheckSuggestBuilder accuracy(float accuracy)
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Sets the accuracy. Defauts to the value of LuceneEnvironment.SpellCheck.ACCURACY which, in turn, defaults to 0.5f.

Specified by:
accuracy in interface SearchEngineSpellCheckSuggestBuilder

suggest

public SearchEngineSpellSuggestions suggest()
Description copied from interface: SearchEngineSpellCheckSuggestBuilder
Returns the given suggestions for the word.

Specified by:
suggest in interface SearchEngineSpellCheckSuggestBuilder


Copyright (c) 2004-2009 The Compass Project.