DB2 Version 10.1 for Linux, UNIX, and Windows

Validating a text index (Windows, AIX®)

Starting with DB2 Version 10 Fix Pack 1, use the Net Search Extender index validation utility (the checknseindex command) to ensure that a text index is working correctly.

Before you begin

Ensure that update or delete operations are not in progress for the text index that you are validating.

About this task

You must check text indexes for probable corruption if any the following scenarios arise:
  • Search queries return errors but do not have specific error codes or explanations.
  • Search results do not reflect newly added or updated text documents.
  • An index update fails.
  • Kernel error messages are in the event log.

Procedure

To validate a text index issue the checknseindex command with at least the -i and -p parameters. This utility uses a significant amount of system resources and might take a long time to run, depending on the size of the text index.

Results

Example 1: Use the checknseindex command to verify the status of a valid text index.
C:\SQLLIB\bin\\checknseindex.exe -p "C:\litu_ict\Corrupted Index\NODE0000" 
-i IX335811 

CTE5265I The NSE index validation utility found the specified index, 
"IX335811", to be valid.
No further action is required.
Example 2: Use the checknseindex command to verify the status of a valid text index that has an incorrect path:
C:\SQLLIB\bin\\checknseindex.exe -p "C:\litu_ict\Corrupted Index\NODE00001" 
-i IX335811 

CTE5254E  The NSE index validation utility failed to validate the specified 
index because the utility could not access the 
path "C:\litu_ict\Corrupted Index\NODE00001".
Fix the index path, and reissue the command again.
Example 3: Use the checknseindex command with the -deepCheck and -v parameters to verify the status of an invalid text index:
C:\SQLLIB\bin\checknseindex.exe -p "C:\litu_ict\Corrupted Index\NODE0000" 
-i IX335812 -deepCheck -v


==================================================

  checknseindex
  -------------

  Net Search Extender index validation utility

==================================================

Validating NSE mapping indexes...

    Forward mapping data control record : Number of blocks = "1"
    Reverse mapping data control record : Number of blocks = "1"
    Forward mapping index control record : Number of documents = "8"
    Reverse mapping index control record : Number of documents = "8"

Validating NSE internal indexes...

Fri Mar 30 13:39:40 2012 Verify primary index...
          100%
Fri Mar 30 13:39:40 2012 Verify secondary index...
          100%
Fri Mar 30 13:39:40 2012 End

Validating consistency of NSE mapping and NSE internal indexes...

CTE5263E  The NSE index validation utility found the NSE mapping index 
and the NSE internal index to be inconsistent.  Reason code: "1".  
Diagnostic data: "".
Attempt to fix the corrupted index.

What to do next