To create an index, the text columns must be one of the following data types:
If the documents are in a column of a different type, such as a user-defined type (UDT), you must provide a function that takes the user type as input and provides as an output type one of the above-mentioned types.
Specify the name of this transformation function. See CREATE INDEX for further information.
Example: You intend to store compressed text in a table.
db2 "CREATE DISTINCT TYPE COMPRESSED_TEXT AS CLOB(1M)"
db2 "CREATE TABLE UDTTABLE (author VARCHAR(50) not null, text COMPRESSED_TEXT, primary key (author))" db2 "INSERT ..."
db2text "CREATE INDEX UDTINDEX for text ON UDTTABLE (uncompress(text)) ..."