IIndexStatusHandler provides an interface to obtain detailed information on the progress of an index update.
File: IIndexStatusHandler.java
Package: com.dtsearch.engine
Method |
Description |
---|---|
Called during IndexJob execution to give the calling process a chance to cancel the update. | |
Called during an index update to provide details on the status of the indexer. |
IIndexStatusHandler is designed for situations where it is important to have complete information, such as logging the names of documents indexed and how each file was indexed. Each time IIndexStatusHandler.onProgressUpdate is called, the IndexProgressInfo.updateType will indicate the reason for the notification. The updateType is a MessageCode value that indicates when, for example, a file was successfully indexed (dtsnIndexFileDone) or could not be indexed due to an error (dtsnIndexFileOpenFail, dtsnIndexFileEncrypted).
To use IIndexStatusHandler,
(1) Create an object that implements the IIndexStatusHandler interface, and
(2) Attach it to an IndexJob prior to calling execute using setStatusHandler2().
Example: