The etx_CreateSynWlst() routine
The etx_CreateSynWlst() routine creates a synonym list that the search engine uses to identify synonyms during a text search.
Syntax
etx_CreateSynWlst (list_name, file_name, sbspace)
Element | Purpose | Data type |
---|---|---|
list_name | Name of your synonym list. If you enter a name longer than 18 characters, the name is silently truncated to 18 characters. | CHAR (18) |
file_name | Absolute path name of the operating system file from which the text search engine loads the synonym list. The file can be on either the server or the client machine. The routine searches the client machine first. | LVARCHAR |
sbspace | Optional parameter to specify the sbspace in which you want to store the synonym list. If you do not specify an sbspace, the database server stores the synonym list in the default sbspace. | CHAR (18) |
Return type
None.
Usage
Use the etx_CreateSynWlst() routine to store a synonym list in an sbspace.
A synonym list is a list of words that you want the search engine to treat as equal. For example, suppose you specify java as a synonym for the root word coffee in your synonym list. The search engine records a hit when it encounters the word java even though you specified the word coffee in your clue.
All words in a clue that are candidates for replacement by their synonyms must be listed as root words. For example, java is a synonym for the root word coffee. A synonym-matching search for the word coffee records a hit if the text search engine finds the word java. The reverse situation, in which a search for java records a hit if the search engine finds coffee, is only true if java is also listed as a root word, with coffee as one of its synonyms.
ABANDON RELINQUISH RESIGN QUIT SURRENDER
ABILITY APTITUDE SKILL CAPABILITY TALENT
SLANT SLOPE INCLINATION TILT LEANING
The default synonym list
$INFORMIXDIR/extend/ETX.version/wordlist/etx_thesaurus.txt
where version is
the current version of the DataBlade module
installed on your computer. If a query refers to the etx_thesaurus synonym list, and the list has not yet been created, the module returns an error.
After you create your list, use the etx_CreateSynWlst() procedure to store the etx_thesaurus list in an sbspace.
Example
EXECUTE PROCEDURE etx_CreateSynWlst
( 'my_synonym', '/local0/excal/syn_file', 'sbsp2');
The search engine stores and loads the contents of my_synonym from the operating system file /local0/excal/syn_file. The etx_CreateSynWlst() procedure stores the synonym list in an sbspace named sbsp2.