public class SpellCheckerConfig
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
boolean |
autoCorrect |
java.lang.String |
blacklistedPrefixHandlers |
boolean |
cancelBadCorrections |
boolean |
computeCorrectedNHits |
static boolean |
DEFAULT_AUTO_CORRECT |
static java.lang.String |
DEFAULT_BLACKLISTED_PREFIX_HANDLERS |
static boolean |
DEFAULT_CANCEL_BAD_CORRECTIONS |
static boolean |
DEFAULT_COMPUTE_CORRECTED_N_HITS |
static boolean |
DEFAULT_ENABLED |
static boolean |
DEFAULT_ENABLED_REFINE |
static int |
DEFAULT_GRACE_DELAY_M_S |
static int |
DEFAULT_HIT_THRESHOLD |
static int |
DEFAULT_QUERY_SIZE_LIMIT |
java.lang.String |
dictionaryName |
boolean |
enabled |
boolean |
enabledRefine |
int |
graceDelayMS |
int |
hitThreshold |
int |
querySizeLimit |
SpellCheckParameters |
spellCheckParameters |
Constructor and Description |
---|
SpellCheckerConfig() |
SpellCheckerConfig(SpellCheckerConfig o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SpellCheckerConfig.
|
static SpellCheckerConfig |
fromString(java.lang.String s)
String representation of this SpellCheckerConfig.
|
java.lang.String |
getBlacklistedPrefixHandlers()
A list of comma-separated prefix handler names defining which parts of the query will NOT be spell checked .
|
java.lang.String |
getDictionaryName()
Dictionary used for spell checking and allow/block lists
|
int |
getGraceDelayMS()
Maximum time to wait for spell checking after query processing has finished.
|
int |
getHitThreshold()
Only performs spell check if the query returns less than N hits.
However, if N=0, spell check is always performed. For example, if N=4, spell check is only activated for queries that return 3 or less hits. |
int |
getQuerySizeLimit()
Queries with more than this count of chunks are considered computer-generated queries for which the spellchecking is disabled.
|
SpellCheckParameters |
getSpellCheckParameters()
Low-level parameters.
|
boolean |
isAutoCorrect()
Automatically performs (uncorrected query) OR (corrected query 1) OR (corrected query 2) ...
|
boolean |
isCancelBadCorrections()
Leaves out alternate expressions that would return less hits than the original query.
This requires computeCorrectedNHits to be true. |
boolean |
isComputeCorrectedNHits()
Calculates and displays the number of hits that will be returned for each suggested expression.
This can impact performance as CloudView must perform the query for each suggestion. Warning: This option is not compatible with disjunctive facets. |
boolean |
isEnabled()
Enables spellcheck on queries.
|
boolean |
isEnabledRefine()
Suggests alternate expressions even if facets have been used to filter hits.
|
SpellCheckerConfig |
makeCopy()
Creates and returns a deep copy of this SpellCheckerConfig.
|
static SpellCheckerConfig |
readFrom(java.io.InputStream is)
Read this SpellCheckerConfig from an XML fragment.
|
void |
setAutoCorrect(boolean autoCorrect)
Automatically performs (uncorrected query) OR (corrected query 1) OR (corrected query 2) ...
|
void |
setBlacklistedPrefixHandlers(java.lang.String blacklistedPrefixHandlers)
A list of comma-separated prefix handler names defining which parts of the query will NOT be spell checked .
|
void |
setCancelBadCorrections(boolean cancelBadCorrections)
Leaves out alternate expressions that would return less hits than the original query.
This requires computeCorrectedNHits to be true. |
void |
setComputeCorrectedNHits(boolean computeCorrectedNHits)
Calculates and displays the number of hits that will be returned for each suggested expression.
This can impact performance as CloudView must perform the query for each suggestion. Warning: This option is not compatible with disjunctive facets. |
void |
setDictionaryName(java.lang.String dictionaryName)
Dictionary used for spell checking and allow/block lists
|
void |
setEnabled(boolean enabled)
Enables spellcheck on queries.
|
void |
setEnabledRefine(boolean enabledRefine)
Suggests alternate expressions even if facets have been used to filter hits.
|
void |
setGraceDelayMS(int graceDelayMS)
Maximum time to wait for spell checking after query processing has finished.
|
void |
setHitThreshold(int hitThreshold)
Only performs spell check if the query returns less than N hits.
However, if N=0, spell check is always performed. For example, if N=4, spell check is only activated for queries that return 3 or less hits. |
void |
setQuerySizeLimit(int querySizeLimit)
Queries with more than this count of chunks are considered computer-generated queries for which the spellchecking is disabled.
|
void |
setSpellCheckParameters(SpellCheckParameters spellCheckParameters)
Low-level parameters.
|
java.lang.String |
toString()
String representation of this SpellCheckerConfig.
|
SpellCheckerConfig |
withAutoCorrect(boolean autoCorrect) |
SpellCheckerConfig |
withAutoCorrect(java.lang.Boolean autoCorrect) |
SpellCheckerConfig |
withBlacklistedPrefixHandlers(java.lang.String blacklistedPrefixHandlers) |
SpellCheckerConfig |
withCancelBadCorrections(boolean cancelBadCorrections) |
SpellCheckerConfig |
withCancelBadCorrections(java.lang.Boolean cancelBadCorrections) |
SpellCheckerConfig |
withComputeCorrectedNHits(boolean computeCorrectedNHits) |
SpellCheckerConfig |
withComputeCorrectedNHits(java.lang.Boolean computeCorrectedNHits) |
SpellCheckerConfig |
withDictionaryName(java.lang.String dictionaryName) |
SpellCheckerConfig |
withEnabled(boolean enabled) |
SpellCheckerConfig |
withEnabled(java.lang.Boolean enabled) |
SpellCheckerConfig |
withEnabledRefine(boolean enabledRefine) |
SpellCheckerConfig |
withEnabledRefine(java.lang.Boolean enabledRefine) |
SpellCheckerConfig |
withGraceDelayMS(int graceDelayMS) |
SpellCheckerConfig |
withGraceDelayMS(java.lang.Integer graceDelayMS) |
SpellCheckerConfig |
withHitThreshold(int hitThreshold) |
SpellCheckerConfig |
withHitThreshold(java.lang.Integer hitThreshold) |
SpellCheckerConfig |
withQuerySizeLimit(int querySizeLimit) |
SpellCheckerConfig |
withQuerySizeLimit(java.lang.Integer querySizeLimit) |
SpellCheckerConfig |
withSpellCheckParameters(SpellCheckParameters spellCheckParameters) |
void |
writeTo(java.io.OutputStream os)
Write this SpellCheckerConfig as an XML fragment
|
public boolean enabled
public static final boolean DEFAULT_ENABLED
public java.lang.String blacklistedPrefixHandlers
public static final java.lang.String DEFAULT_BLACKLISTED_PREFIX_HANDLERS
public boolean enabledRefine
public static final boolean DEFAULT_ENABLED_REFINE
public boolean computeCorrectedNHits
public static final boolean DEFAULT_COMPUTE_CORRECTED_N_HITS
public int hitThreshold
public static final int DEFAULT_HIT_THRESHOLD
public boolean cancelBadCorrections
public static final boolean DEFAULT_CANCEL_BAD_CORRECTIONS
public boolean autoCorrect
public static final boolean DEFAULT_AUTO_CORRECT
public int graceDelayMS
public static final int DEFAULT_GRACE_DELAY_M_S
public int querySizeLimit
public static final int DEFAULT_QUERY_SIZE_LIMIT
public java.lang.String dictionaryName
public SpellCheckParameters spellCheckParameters
public SpellCheckerConfig()
public SpellCheckerConfig(SpellCheckerConfig o)
public void setEnabled(boolean enabled)
public boolean isEnabled()
public SpellCheckerConfig withEnabled(boolean enabled)
public SpellCheckerConfig withEnabled(java.lang.Boolean enabled)
public void setBlacklistedPrefixHandlers(java.lang.String blacklistedPrefixHandlers)
public java.lang.String getBlacklistedPrefixHandlers()
public SpellCheckerConfig withBlacklistedPrefixHandlers(java.lang.String blacklistedPrefixHandlers)
public void setEnabledRefine(boolean enabledRefine)
public boolean isEnabledRefine()
public SpellCheckerConfig withEnabledRefine(boolean enabledRefine)
public SpellCheckerConfig withEnabledRefine(java.lang.Boolean enabledRefine)
public void setComputeCorrectedNHits(boolean computeCorrectedNHits)
public boolean isComputeCorrectedNHits()
public SpellCheckerConfig withComputeCorrectedNHits(boolean computeCorrectedNHits)
public SpellCheckerConfig withComputeCorrectedNHits(java.lang.Boolean computeCorrectedNHits)
public void setHitThreshold(int hitThreshold)
public int getHitThreshold()
public SpellCheckerConfig withHitThreshold(int hitThreshold)
public SpellCheckerConfig withHitThreshold(java.lang.Integer hitThreshold)
public void setCancelBadCorrections(boolean cancelBadCorrections)
public boolean isCancelBadCorrections()
public SpellCheckerConfig withCancelBadCorrections(boolean cancelBadCorrections)
public SpellCheckerConfig withCancelBadCorrections(java.lang.Boolean cancelBadCorrections)
public void setAutoCorrect(boolean autoCorrect)
public boolean isAutoCorrect()
public SpellCheckerConfig withAutoCorrect(boolean autoCorrect)
public SpellCheckerConfig withAutoCorrect(java.lang.Boolean autoCorrect)
public void setGraceDelayMS(int graceDelayMS)
public int getGraceDelayMS()
public SpellCheckerConfig withGraceDelayMS(int graceDelayMS)
public SpellCheckerConfig withGraceDelayMS(java.lang.Integer graceDelayMS)
public void setQuerySizeLimit(int querySizeLimit)
public int getQuerySizeLimit()
public SpellCheckerConfig withQuerySizeLimit(int querySizeLimit)
public SpellCheckerConfig withQuerySizeLimit(java.lang.Integer querySizeLimit)
public void setDictionaryName(java.lang.String dictionaryName)
public java.lang.String getDictionaryName()
public SpellCheckerConfig withDictionaryName(java.lang.String dictionaryName)
public void setSpellCheckParameters(SpellCheckParameters spellCheckParameters)
public SpellCheckParameters getSpellCheckParameters()
public SpellCheckerConfig withSpellCheckParameters(SpellCheckParameters spellCheckParameters)
public SpellCheckerConfig makeCopy()
public static SpellCheckerConfig readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static SpellCheckerConfig fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.