Retrieve Status of Indexes Objects

This procedure returns the status of all objects in the text search collection.

GET_OBJECT_STATUS

Authorization

This stored procedure is created with public authority *EXCLUDE and is owned by the creator of the text search collection.

The procedure will adopt the authority of the text search collection owner's profile. Authority can be granted to other users to allow them to execute the procedure.

Syntax

Read syntax diagramSkip visual syntax diagram GET_OBJECT_STATUS

The schema qualifier is the name of the text search collection.

Parameters

None

RESULT SET RETURNED

The procedure returns a result set that has one row for each object set:

OBJECT                 XML
STATUS_TIMESTAMP       TIMESTAMP
STATUS_CODE            INTEGER
TEXT_STATUS            VARCHAR(100)

OBJECT - The location information for the object in the index, this matches the format returned by search for the OBJECTINFOR column.

STATUS_TIMESTAMP - If the object is in the INDEXED state, then this is the modification timestamp of the object in the index. In other words changes made to the object prior to this time are reflected in the text search index. For all other state values, this timestamp is the time the state was recorded in the index. For example: If the object's state is ERROR, this is the time that the error was recorded.

STATUS_CODE - A numeric value representing the state of this object:
0  = The object has been indexed and no changes were detected to the object.
10 = The object is currently in the process of being indexed.
20 = Changes to the object have been detected.
30 = The object was indexed, but a warning occurred during the indexing process.
40 = An error prevented the object from being indexed.

These values allow more complex selection criteria. i.e. retrieve all objects not current in the index could be expressed as STATUS_CODE > 0.

Note: the state of objects that are in the process of being updated, or were in the process of being updated when an update was canceled, could differ from reality. It is possible for an object to report there are changes pending, when in fact the text to be indexed has already been sent to the server. It is also possible to a document's status to be 'INDEXED', but the object may not be search-able until a future commit point in the update process. The STATUS_CODE will reflect reality when the update stored procedure has completed.

The result set is sorted (descending) by status code.

TEXT_STATUS - The Text Version of the status code:
0   = INDEXED
10  = INDEXING
20  = CHANGES PENDING
30  = WARNING
40  = ERROR

Examples

Call MYCOLLECTION.GET_OBJECT_STATUS;