(C) IBM Corp. 1996, 1999
Text Extender: Administration and Programming
A search argument is the condition that you specify when searching for
terms in text documents. It consists of one or several search terms and
search parameters.
Examples of search arguments are given in Specifying search arguments, and in a file called txsample.udf.
It contains examples of Text Extender UDFs that run against the sample table
described in The sample table DB2TX.SAMPLE.
The UDFs that use search arguments are:
- CONTAINS. This function uses a search argument to search for text
in a particular text document. It returns the INTEGER value 1 if the
document contains the text. Otherwise, it returns 0.
- NO_OF_MATCHES. This function uses a search argument to search
in text documents. It returns an INTEGER value indicating how many
matches resulted per document.
- RANK. This function uses a search argument to search in text
documents. It returns a value for each document found, indicating how
well the found document is described by the search argument.
- REFINE. This function takes two search arguments and returns a
combined search argument of type LONG VARCHAR, consisting of the two original
search arguments connected by the Boolean operator AND.
- HANDLE_LIST. This function uses a search argument to search in
text documents. It returns a value of type DB2TEXTHLISTP or
DB2TEXTFHLISTP that points to a list of handles for the found
documents.
- SEARCH_RESULT. This function returns a table containing the
requested information, that is, the rank, number of matches, and the
handle.
The API functions that use search arguments are:
- DesGetBrowseInfo. This function uses a search argument for
searching through text identified by a handle. It returns a pointer to
browse information needed by DesStartBrowseSession for highlighting
terms.
- DesGetSearchResultTable. This function uses a search argument for
searching through text documents identified by a text column. The
handle data of the found text items is written to a result table.
Browse information about rank and the number of matches can also be written to
the result table.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]