In Sybase Search, the use of synonyms and acronyms is collectively called query augmentation. Synonyms are implemented as lists of words that are considered to have the same meaning. For example:
Drowsy, lethargic, listless, sleepy
Holiday, vacation
When a term featured in a list is used as a query parameter,
all the other words in the list are appended to the query. For example,
the query The medicine made me drowsy
,
when augmented using the previous synonym examples, becomes the
following query:
The medicine made me drowsy, lethargic,
listless, sleepy
.
Acronyms are implemented as a list of keys (or a single key) with a corresponding list of values. In the following example the keys “HTML” and “HTM” have the values “Hypertext Markup Language”:
HTML, HTM = Hypertext Markup Language
USA, US = United States of America
Acronyms can augment a query in two ways:
Acronym
expansion – when a term featured in an acronym key list
is found in a user’s search terms, all the corresponding
values are added to the original query. For example, the query How
to write HTML documents
, when augmented with
the previous acronym examples, becomes the following query:
How to write HTML Hypertext Markup Language
documents
.
Acronym
resolution – when a list of terms featured as an acronym
values list is found in a user’s search terms, all the
corresponding keys are added to the original query. For example,
the query How to write Hypertext Markup Language
documents
, when augmented with the previous acronym
examples, becomes the following query:
How to write Hypertext Markup Language HTML
HTM documents
.
You can change the list of synonyms and acronyms using one of two methods:
Edit the list of words in the default synonyms and acronyms file, QueryAugmentor_en.xml, available in install_location\OmniQ\config, or
Create a new query augmentation file and configure the Text Manager to read from the new file by editing install_location\OmniQ\config\TextModule.default.xml and changing the value of the query.augmentor.filename parameter to point to the new file.
The format of QueryAugmentor_en.xml is as follows:
<QueryAugmentor xml:”en”> <Synonym> <Word>vacation</Word> <Word>holiday</Word> </Synonym> etc <Acronym> <Word>UK</Word> <Phrase>united kingdom</Phrase> </Acronym> etc </QueryAugmentor>
Synonyms and acronyms are processed at runtime, so you
can edit the augmentation list without having to index any documents
again. However, you must restart Sybase Search to load the new synonym
and acronym lists.