The SEARCH_RESULT function returns the result of a search in an intermediate table. This UDF can be used in a FROM clause of an SQL statement.
The returned table has the following structure:
Column Name Datatype HANDLE DB2TX.DB2TEXTH, DB2TX.DB2TEXTFH NUMBER_OF_MATCHES INTEGER RANK DOUBLE
Values are generated only for the selected columns of the intermediate table. Select count(*) generates the HANDLE column only. Because the calculation of the rank values consumes a lot of system resources, you should not select the rank value from the intermediate table if the rank value is not required.
This UDF is faster than CONTAINS or RANK when processing large tables.
Function syntax
>>-SEARCH_RESULT--(--handle--,--search-argument--)-------------><
Function parameters
Examples
For an example, refer to Improving search performance, or look at the sample UDFs provided in the file described in The sample UDFs.