The etx_CreateStopWlst() routine
The etx_CreateStopWlst() routine creates a list of words that the text search engine ignores when it performs a search or builds an index.
Syntax
etx_CreateStopWlst (list_name, file_name, sbspace)
Element | Purpose | Data type |
---|---|---|
list_name | Name of your stopword 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 stopwords. 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 stopword list. If you do not specify an sbspace, the database server stores the stopword list in the default sbspace. | CHAR (18) |
Return type
None.
Usage
Use the etx_CreateStopWlst() routine to store a stopword list in an sbspace.
A stopword list is a list of words that you want eliminated from both an etx index and the text search clue. A typical word list might include the prepositions of, by, with, and other prepositions. Eliminating stopwords from the search process can significantly improve the performance of your searches.
When
you create a stopword list, you might use your own operating system
file containing a list of stopwords or use the one provided by the DataBlade® module:
$INFORMIXDIR/extend/ETX.version/wordlist/etx_stopwords.txt
where version is
the current version of the DataBlade module
installed on your computer.The format of the operating system
file that contains the list of stopwords is one stopword per line.
The operating system file must not contain any proprietary formatting
information and must consist only of characters made available to
the index by the CHAR_SET index parameter when the index was created.
Important: An etx index can be associated with at most
one stopword list, which must be specified by the STOPWORD_LIST index
parameter when you create the index. If you want to change the stopword
list associated with an etx index, you must first drop the
index and then recreate it, specifying the name of the new stopword
list.
Examples
The following example creates a
stopword list named my_stopword:
EXECUTE PROCEDURE etx_CreateStopWlst
('my_stopword', '/local0/excal/stp_word', 'sbsp1');
The search engine stores and loads the contents of my_stopword from the operating system file /local0/excal/stp_word. The etx_CreateStopWlst() procedure stores the stopword list in an sbspace named sbsp1.