Net Search Extender, here after called NSE, is an IBM®
DB2® extender providing full text search support in DB2. NSE searches
documents stored in columns of database tables by maintaining its internal
text indexes. Rather than searching sequentially through text documents stored
in database columns at query time, NSE uses its text indexes to search in an
efficient manner. Verification of NSE indexes are vital because the errors
reported by the top layer applications on full text index can be misleading.
This unnecessarily delays the problem resolution at
the production system. To prevent such a situation, the NSE Index Verification
tool was developed to verify the NSE index validity and consistency, and
to check whether or not indexes are valid.

Lalatendu Patro started his work with IBM as a Development Lead for Net Search Extender in DB2. He has worked on DB2 Install URE along with NSE development activities. Prior to IBM, he has worked in embedded systems for messaging protocols such as SMS, Email, ActiveSync and server technologies for gateways and server applications. Currently he is working as the Development Lead for DB2 TextSearch project.

Overview

NSE offers full text search capability to DB2 and other databases by
helping with their internal indexes. These text indexes get updated
automatically or manually (as configured) with an update in the database
columns for which these indexes are created.

NSE indexes normally consist of mapping indexes and internal text indexes.
NSE keeps both of these data structures in sync for every index update
operation. Hence, for normal operational situations, the following
conditions should be maintained:

NSE mapping indexes are proper.

Internal text indexes are proper.

Mapping indexes and internal text indexes are in sync.

When top layer applications find errors in NSE functionality, you should
verify the consistency of NSE indexes to confirm the errors. The NSE Index
Verification tool was developed to verify the validity of the NSE index.
This tool verifies the previously mentioned three conditions and tells you
whether the NSE internal data structure is proper or not.

This tool is available in both Windows® and UNIX®-based platforms. In the
Windows platform, it is checknseindex.exe, and
in UNIX-based platforms it is checknseindex.
This tool can be found in the directory
/<DB2
instance directory>/bin/
in the supported releases or fix packs. This tool is available in the
following DB2 for Linux, UNIX, and Windows releases:

NSE Index Verification tool usage options

This tool supports three options for verifying an NSE index. These options
simplify the use of the tool, so that you can run it with information that you have
available.
Basically this tool requires "Index Path" and
"Index Id" to verify the NSE index. However in many situations you may
find it difficult to get the IndexPath or IndexId. Hence the tool supports options
where you can provide the database details, and the tool can get the required
information from the database and verify the NSE index.

The tool options are classified based on available information
with the user, with a choice to run the tool either using "index directory
and index ID" or with database information such as table name-column name,
index schema-index name. The tool supports the following three kinds of clauses:

Considerations
for running the index verification tool

The user should have access privileges to the index directory.
(This tool needs read access to NSE internal indexes to analyze
consistency of internal data structures.)

For very large text indexes, the tool may require more time to analyze the
internal indexes. Hence the -deepCheck option can be used to check internal index
consistencies if mapping indexes are found to be proper when checked without
-deepCheck option.

The tool can be used offline or online (that is, with or without database
support). Since the tool analyzes NSE internal indexes, you should avoid updating
indexes either manually or automatically while the tool is being used.
NSE index update modifies NSE internal indexes, hence tool usage during this process
may result in imcorrect results. Text search operations using NSE is possible while
using the tool. Even basic database insert/update/delete operations are permitted during
tool use.

In rare cases, the internal key list becomes exhausted. As a result NSE does
not allow text index update. Searching is possible with this problem. The index
verification tool
verifies this key list exhaustion condition with the -deepCheck option and reports
this condition. If the situation is reported, you need to plan to recreate the text
index in parallel.

Conclusion

The index verification tool confirms the consistency of NSE internal indexes. It ensures
NSE internal structures are proper, and that NSE is operating normally. This tool
will report any inconsistencies, allowing you to save troubleshooting time for
any NSE text index related errors at the production systems, and to resolve the
problems.

The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.