Reindexing Lookups in a Tenant
Learn about reindexing lookups in a tenant to resolve discrepancies caused by indexing issues in Elasticsearch.
When lookups are created in a tenant, they are automatically indexed in Elasticsearch (ES). However, if the ES service encounters issues during or immediately after this process, it can lead to inconsistencies in the indexed lookup data. To correct these discrepancies and ensure accurate search behavior, you can manually reindex the affected lookups in your tenant using the available task parameters.
To reindex the lookup in a tenant, use the parameters listed in Table 1: Parameters to Reindex the Lookups.
Parameter Name | Mandatory | Type | Description |
---|---|---|---|
type
| No | String | Indicates the type of lookups to reindex. If the type is not set then all lookups will be reindexed. |
uris
| No | Array | Defines the list of lookup URIs to be reindexed. |
enableSeparateIndexing | No | Boolean | If set to true, lookups will be reindexed into a separate index. If not set, they will be reindexed into the existing index. For more information, see About enableSeparateIndexing. |
Example: Reindex all lookups in a tenant
POST https://{{rdm-service}}/tasks/{{tenantId}}
Authorization: Bearer {{token}}
{
"type": "reindex"
}
POST https://{{rdm-service}}/tasks/{{tenantId}}
Authorization: Bearer {{token}}
{
"type": "reindex",
"parameters": {
"type": "rdm/lookupTypes/Country"
}
}
POST https://{{rdm-service}}/tasks/{{tenantId}}
Authorization: Bearer {{token}}
{
"type": "reindex",
"parameters": {
"enableSeparateIndexing": "true"
}
}
About enableSeparateIndexing
When the reindex task runs with enableSeparateIndexing=true
, the system creates a second index called the bufferedIndex
. During the task:
- Your tenant temporarily maintains two indexes: the main index and the buffered index.
- The API continues to use the main index for searches, while writing updates to both indexes.
- This setup allows reindexing to occur in the background, without disrupting your work.
After the task completes, the system promotes the buffered index to replace the main index. All lookups are stored in a single index, and the old index is discarded.
While the task is running, you can continue working without needing to wait for it to finish.