Before you start
Learn what to expect from this tutorial, and how to get the most out of it.
DB2 Text Search is an integrated component of DB2 9.5 and is powered by the IBM OmniFind™ Text Search server. It provides the following features:
- Full text search in text, HTML, and XML documents, including Boolean and wildcard search
- Fully integrated SQL, SQL/XML, and XQuery support, including XPath syntax subset to search XML documents
- Linguistic processing with optional synonyms definition
- Asynchronous index update with scheduling option
This tutorial demonstrates how to use the basic features of DB2 Text Search to search in plain text and XML documents stored in the database and guides you through the following tasks:
- Preparing the database setup
- Creating text-search indices for text data and XML documents
- Populating text-search indices
- Searching in plain text
- Determining the relevance of results
- Searching in XML documents
- Updating text-search indices
- Cleaning up
System requirements and prerequisites
To complete the following steps, you must have at least IBM DB2 9.5 for Linux, UNIX, and Windows, Fix Pack 1 installed on the system. Note that you cannot use DB2 Text Search in a partitioned database environment on a DB2 instance with multiple partitions.
To proceed through the tutorial using a step-by-step approach, the
commands can be executed as DB2 CLP interactive commands using the
db2 -t command. The
db2ts text-search index administration
commands have to be run at the operating system prompt. However, these
commands can be executed in the same window by using the shell command
(!). In this mode, every statement would also have to use the
statement termination character—a semicolon (;).
To run the examples in this article, make sure that you have DBADM authority on the DB2 database server that you want to use. If you create the database as described in the next section, this authority is automatically assigned. The DBADM authority is needed to manage the text-search instance services and to create and modify the database used in the examples.




