If spelling correction and automatic phrasing are enabled and triggered, the MDEX Engine implements them as part of the record search processing.
If the spelling correction feature is enabled and triggered, the MDEX Engine creates spelling suggestions by enumerating (for each query term) a set of alternatives, and considering some of the combinations of term alternatives as whole-query alternatives.
Each of these whole-query alternatives is subject to thesaurus expansion and stemming.
For example, if the tokenized query is
employee moral
, then
employee
may generate the set of alternatives
{employer
,
employee
,
employed
}, while
moral
may generate the set of alternatives
{moral
,
morale
}.
The two query alternatives generated as spelling suggestions might be
employer moral
and
employee morale
.
If automatic phrasing is enabled, then the MDEX Engine automatically combines distinct query terms that match a phrase in the phrase dictionary into a search phrase.
Once distinct terms are grouped as an automatic phrase, the phrase is not subject to additional thesaurus expansion and stemming.
For example, suppose the phrase dictionary contains two phrases
Kenneth Cole
and also
blue jeans
. If the query is
Kenneth Cole blue jeans
, the alternative query
might be
"Kenneth Cole" "blue jeans"
.