DocumentStatus getDocumentStatus(String uri) and DocumentStatus[] getDocumentStatusList(String[] uriList)

This method retrieves the status of a document within the indexed corpus specified by the URI parameters.

This status may be used by the connector to compare with the document status in the source, and then determine whether the document needs to be updated. The structure is serialized and returned in the response body.

The getDocumentStatusList method retrieves the status of a list of documents within the pushed corpus.

This page discusses:

Data types

The DocumentStatus object contains:

Types

Description

uri

A URI is an opaque string that uniquely identifies the document from the connector point of view.

See also URI.

stamp

An optional Stamp.

See also Stamps.

exist

A boolean that indicates the indexing status of the document:

  • true indicates that a document with the given uri has already been sent to the Indexing System. However, this does not guarantee that the document has been indexed nor that the document can be seen by the user.
  • false indicates that the given uri is unknown to the Indexing System.
class DocumentStatus
{
  String getUri();
  String getStamp();
  boolean isExist();
}

HTTP method

The method used is:

GET no-cache http://<host>:<port>/papi/4/connectors/<connectorName>/get_documents_status

HTTP parameters

The HTTP parameters are described in the table below.

Parameter

Location

Description

PAPI_uri

[URL]

The uri parameter is the string of the document URI.

To delete many files, send multiple PAPI_uri parameters.

PAPI_session

[URL]

The optional parameter that retrieves the session given by a previous call to get_current_session_id

Action: if there is a session mismatch, the Push API server refuses the command and returns an exception.

HTTP response

The command uses the standard HTTP responses. See HTTP command response.

If successful (status = OK), then the body contains the serialized form of the DocumentStatus in XML format.

Here is the response format for each entry:

[M/D] [space] [url_encode(URI)]         [space] [escape(STAMP)] [\n]
\ only if document is existing /

Where:

  • url_encode() – is a function which performs an url encoding of the given value.

  • escape() – is a function which replaces \r and \n with \\r and \\n.

  • M/DM indicates a missing entry, D indicates an existing document.