How Spell Correction Works

To enable spell checking, set the parameters SpellCheckMaxCheckTerms, SpellCheckIncorrectMaxDocOccs, and UnstemmedMinDocOccs in the [Server] section of the configuration file before you index content. When you perform a query that includes Spellcheck=True, HPE IDOL Server uses these settings in the spell checking process, as shown below:

  1. HPE IDOL Server determines if the query is eligible for spell checking.

    HPE IDOL Server checks how many terms the query text contains (it ignores stop words, proper-name terms and hyphenated terms). If the number does not exceed the specified SpellCheckMaxCheckTerms, the query is eligible for spell checking.

  2. HPE IDOL Server determines which terms are misspelled.

    HPE IDOL Server checks how many times each query term occurs in its data index. If a term occurs fewer times than the specified SpellCheckIncorrectMaxDocOccs, HPE IDOL Server assumes that the term is misspelled.

  3. HPE IDOL Server finds correct spellings and suggests them.

    HPE IDOL Server uses a proprietary term-distancing algorithm to find terms in its data index that are closest to the misspelled terms. It then checks how many times these terms occur. If a term occurs at least the specified number of UnstemmedMinDocOccs times, it uses it as a spell check suggestion.

    HPE IDOL Server returns the corrected terms as a comma-separated list in an <autn:spelling> field. It also returns a corrected version of the query text in an <autn:spellingquery> field.

  4. When you shut down HPE IDOL Server, it creates a spelling correction file.

    The spelling correction file stores the corrections that you make. You can add further corrections to the file or amend existing corrections.