Configuration

Net Search Extender can be configured using either the command line or the DB2 Control Center. To enter the CLP environment, type db2text. This is similar to the Text Extender and database CLP environments. You can enter Net Search Extender commands from this prompt or precede any command with the db2text from a regular prompt.

Configuration for Net Search Extender is similar to Text Extender. Each database must be enabled to use Net Search Extender before a search index can be created. Enabling a database creates UDTs, stored procedures, administration tables, and views needed for Net Search Extender to work. Once a database is enabled, it will stay enabled until issuing the disable command. The selected database can be enabled and disabled with the following commands. The connection information can be omitted from the syntax if the default database environment variable, DB2DBDFT, is set to the database name.

db2text ENABLE DATABASE FOR TEXT [CONNECT TO database-name]
db2text DISABLE DATABASE FOR TEXT [CONNECT TO database-name]

The database also can be enabled and disabled using the DB2 Control Center. Right-click on the database and select Net Search Extender. A popup appears to enable or disable the database. See Figure 16.2 for an example.

Figure 16.2. Enabling and disabling Net Search Extender.


Creating an Index

There is no need to specify the index type during index creation because only one index type is available. Net Search Extender uses an optimized NGRAM index. This index is able to perform boolean searches, wild card searches, section searches, and algorithmic base-form reduction. The section search feature allows documents to tag document sections as searchable. Algorithmic base-form reduction is unique to Net Search Extender. Unlike Text Extender base-form reduction, algorithmic base-form reduction does not use a dictionary. Here is the basic syntax for creating and dropping an index. See the Net Search Administration Guide for a complete list of index-creation options. The connection information can be omitted from the syntax if the default database environment variable, DB2DBDFT, is set to the database name.

db2text CREATE INDEX index-name FOR TEXT ON table-name (column-name)[CONNECT TO database-name]
db2text DROP INDEX index-name FOR TEXT [CONNECT TO database-name]

The index also can be created using the DB2 Control Center. Right-click on the Text Index property and select Create. See Figure 16.3 for an example.

Figure 16.3. Creating a Net Search Extender.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.108