Each replacement set is enclosed within a <replacement> tag. Within each replacement tag you can specify one or more patterns enclosed by a <pat> tag. You can specify one or more substitutions enclosed by <sub> tags. You can specify a pattern to be replaced by a substitution set. Patterns and substitutions can contain a word, or a sequence of words.
For example, suppose you want queries for "W2K", the pattern, to be replaced by "Windows 2000" or "XP", the substitutions. If you run a full-text query for "W2K", Full-Text Search only returns search results containing "Windows 2000" or "XP". It does not return results containing "W2K". This is because the pattern "W2K" has been "replaced" by the patterns "Windows 2000" and "XP".
This is what the replacement set section would look like for the above example:
<replacement>
<pat>W2K</pat>
<sub>Windows 2000</sub>
<sub>XP</sub>
</replacement> If you have two replacement sets with similar patterns being matched, the longer of the two takes precedence. For example, if you run a FORMS OF THESAURUS query for "Internet Explorer online community" and you have the following replacement sets, the "Internet Explorer" replacement set takes precedence over the "Internet" replacement set. The query will therefore be processed as "IE online community" or "IE 5 online community".
<replacement>
<pat>Internet</pat>
<sub>intranet</sub>
</replacement> and
<replacement>
<pat>Internet Explorer</pat>
<sub>IE</sub>
<sub>IE 5</sub>
</replacement>