The etx_Filter() routine

The etx_Filter() routine filters proprietary formatting information from data in a specified column so that only its contents are returned.

Syntax

etx_Filter ( column)
Element Purpose Data type
column Name of the column you want to filter. The column element might be specified as a FileToBlob() operation with the following syntax: FileToBlob('pathname', 'client') One of BLOB, CLOB, LVARCHAR, CHAR, VARCHAR, IfxMRData, or IfxDocDesc

Return type

The etx_Filter() routine returns a CLOB value that contains the filtered text.

Usage

The module filters data in a column when you create an index on it and specify the FILTER index parameter. When you retrieve documents, however, you retrieve data that includes the formatting data. You can use the etx_Filter() routine to manually filter documents when you select them so that only text contents are returned.

If a filter error occurs while you are using the etx_Filter() routine, and you have enabled tracing, the logs an error with row ID -1. This is because etx_Filter() was used by itself and is not associated with a row being indexed. See Enable tracing for information about tracing.

Examples

The following example shows how to use the etx_Filter() routine in a SELECT statement:
SELECT etx_filter (abstract)
    FROM my_table
    WHERE id = 5;
The following example shows how to execute the etx_Filter() routine with a FiletoBlob() expression so that you can filter an operating system file before you add it to the database:
EXECUTE FUNCTION etx_Filter(FileToBLOB('/tmp/some.doc', 'client'));