diff --git a/documentation/ingestion_server/guides/upgrade.md b/documentation/ingestion_server/guides/upgrade.md index 467019a1c01..08e7711ed0a 100644 --- a/documentation/ingestion_server/guides/upgrade.md +++ b/documentation/ingestion_server/guides/upgrade.md @@ -57,7 +57,9 @@ differences. - If the staging API reports errors, immediately switch back the aliases to the old indices. - - If the staging API works, delete the old indices to recover the free space. + - If the staging API works, + [delete the old indices](/ingestion_server/reference/task_api.md#delete_index) + to recover the free space. ### Production deployment @@ -102,8 +104,9 @@ differences. - If the production API reports errors, immediately switch back the aliases to the old indices. - - If the production API works, delete the old indices to recover the free - space. + - If the production API works, + [delete the old indices](/ingestion_server/reference/task_api.md#delete_index) + to recover the free space. ## Rollback diff --git a/documentation/ingestion_server/reference/task_api.md b/documentation/ingestion_server/reference/task_api.md index f69d53bdab4..b2e23b3526f 100644 --- a/documentation/ingestion_server/reference/task_api.md +++ b/documentation/ingestion_server/reference/task_api.md @@ -63,7 +63,7 @@ suffix. $ curl \ -X POST \ -H 'Content-Type: application/json' \ - -d '{"model": "image", "action": "CREATE_AND_POPULATE_FILTERED_INDEX", "destination_index_suffix": "kw"}' \ + -d '{"model": "image", "action": "CREATE_AND_POPULATE_FILTERED_INDEX", "destination_index_suffix": "20231106"}' \ http://localhost:8001/task ``` @@ -93,3 +93,33 @@ $ curl \ -d '{"model": "image", "action": "POINT_ALIAS", "index_suffix": "20231106", "alias": "image-filtered"}' \ http://localhost:8001/task ``` + +## DELETE_INDEX + +This endpoint deletes the given index for a given media type. + +```{danger} +Index deletion is an irreversible destructive operation. Please ensure that you +do not delete an index that is currently in use as the default or filtered index +for a media type. +``` + +### Body + +```typescript +{ + model: "image" | "audio" + action: "DELETE_INDEX" + index_suffix: string +} +``` + +### Example + +```console +$ curl \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{"model": "image", "action": "DELETE_INDEX", "index_suffix": "20231106"}' \ + http://localhost:8001/task +```