Reindexing contents via REST
When should I reindex contents?
You may notice that full-text search is not indexing all contents in your repository. This will happen in a situation where contents have been uploaded to a repository before full-text was available, for example:
- When you have just connected an external repository (such as Documentum) to Document.One (D1), the contents of which have been uploaded previously (not in D1).
- When contents have been uploaded to a repository at a time when full-text search was disabled.
In this case, reindexing of the contents is necessary, to make sure that full-text search works as expected on all contents. This document explains how to do it using D1 REST API (you can also do it from user interface — see Reindexing contents in D1.
All D1 REST services require a valid session ID. For information on how to obtain it, read Authenticating to D1 via REST.
Reindexing specific content by ID
This service allows you to reindex specific content by ID. To execute it, send a POST HTTP request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex
, passing the content ID in the request message body. In the cURL example below, we are requesting content identified by content_id
to be reindexed:
curl -X POST "https://adx-local:9080/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "contentId=content_id"
As a result, a reindexing job is created, and the jobId
parameter, identifying this job, is returned.
For detailed information about the /content/reindex
endpoint, please read Full endpoint description.
Reindexing multiple contents by IDs
This service allows you to reindex multiple contents identified by their IDs. To execute it, send a POST HTTP request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex
, passing the content IDs in the request message body. In the cURL example below, we are requesting contents identified by contentId1
and contentId2
to be reindexed:
curl -X POST "http://adx-local:9080/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "contentIds=contentId1" -F "contentIds=contentId2"
As a result, a reindexing job is created, and the jobId
parameter, identifying this job, is returned.
For detailed information about the /contents/reindex
endpoint, please read Full endpoint description.
Reindexing contents by condition
This service allows you to reindex contents identified by their properties. To execute it, send a POST HTTP request to https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex/by-condition
, passing the properties (conditions) in the request message body. In the cURL example below, we are requesting contents identified by createdBy
and owner
properties to be reindexed:
curl -X POST "http://adx-local:9080/tribefire-services/api/v1/access.adx.content.fulltext/v1/contents/reindex/by-condition?sessionId=someId" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "createdBy=grzegorz" -F "owner=grzegorz"
As a result, reindexing job is created, and the jobId
parameter, identifying this job, is returned.
If you do not pass any parameters, all contents will be reindexed!
For detailed information about the /contents/reindex/by-condition
endpoint, please read Full endpoint description.
Full endpoint description
The table below explains what parameters you can pass to specific reindexing requests.
HTTP request type | Endpoint | Service description | Request query parameters | Form data | Returns |
---|---|---|---|---|---|
POST | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/content/reindex | Reindex specific content by ID | sessionId | contentId | ID of the reindexing job. |
POST | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex | Reindex multiple contents by IDs | sessionId | contentIds | ID of the reindexing job. |
POST | https://adx_host.com/tribefire-services/api/v1/access.adx.content.repositoryname/v1/contents/reindex/by-condition | Reindex contents by condition | sessionI | createdBy , lastModifiedBy , name , owner , parentId , tags | ID of the reindexing job. |
Parameters
The table below explains the parameters used for reindexing contents.
Name | Required | Data type | Description |
---|---|---|---|
sessionId | true | string | Session ID returned by authentication request. Mandatory in all reindexing requests. |
contentId | true | string | Content ID, identifying a single content to be reindexed. |
contentIds | true | array | Array of content IDs, identifying contents to be reindexed. |
createdBy | string | Property identifying the creator of a content. | |
lastModifiedBy | string | Property identifying the user who modified the content most recently. | |
name | string | Content name. | |
owner | string | Content owner. | |
parentId | string | Property identifying a folder (where contents are located). | |
tags | array | Array of tags assigned to contents. |
OpenAPI
For code samples, see