[ You are here:
XTF ->
Tag Reference ->
crossQuery ->
Query Parser Output Tags -> Spelling Correction Tag ]
Spelling Correction Tag
This tag specifies that the Text Engine should evaluate whether terms of the query were likely misspelled, and to suggest likely correction(s) for each term. This tag should appear directly within a
Query Tag.
<spellcheck {fields = "FieldNames" }
{docScoreCutoff = "MaxDocScore"}
{totalDocsCutoff = "MaxDocCount"}/>
where
fields="FieldNames" |
is an optional attribute that restricts spelling correction to the specified set of fields. The field names can be separated by commas, semicolons, pipe symbols (|), or spaces. If not specified, or if set to the special value #all, then all tokenized fields in the index will be checked for spelling (including the special field text which contains all words not marked as meta-data.) Specifying a subset of fields can speed up query processing if the Query Parser stylesheet introduces extra fields that the user didn't explicitly type, and thus needn't be checked for spelling. |
docScoreCutoff="MaxDocScore" |
is an optional attribute that controls whether XTF performs spelling correction. If any document resulting from the query scores higher than this number, no correction will be performed. If not specified, this attribute defaults to 0.0, which disables the score cutoff. |
totalDocsCutoff="MaxDocCount" |
is an optional attribute that controls whether XTF performs spelling correction. If the number of documents resulting from the query exceeds this number, spelling correction will not be performed. If set to zero, the document count cutoff is disabled (correction will always be considered.) If not specified, this attribute defaults to 10, meaning that if less than 10 documents are found by a query, spelling correction is applied. |
If spelling corrections are found, the
Result Formatter stylesheet will receive a
Spelling Result tag.