Add an example for restoring a searchable snapshot (#6002)

* Add an example for restoring a searchable snapshot 

Signed-off-by: Anas Alkouz <aalkouz@amazon.com>

* Update the restore snapshot example with indices setting and add a reference to the snapshot restore api

Signed-off-by: Anas Alkouz <aalkouz@amazon.com>

* Tiny changes to description wording

Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Signed-off-by: Anas Alkouz <aalkouz@amazon.com>

---------

Signed-off-by: Anas Alkouz <aalkouz@amazon.com>
Co-authored-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
This commit is contained in:
Anas Alkouz 2023-12-28 15:45:31 -08:00 committed by GitHub
parent 077f613230
commit f4b623b843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -45,6 +45,21 @@ Request Field | Description
:--- | :--- :--- | :---
`storage_type` | `local` indicates that all snapshot metadata and index data will be downloaded to local storage. <br /><br > `remote_snapshot` indicates that snapshot metadata will be downloaded to the cluster, but the remote repository will remain the authoritative store of the index data. Data will be downloaded and cached as necessary to service queries. At least one node in the cluster must be configured with the `search` node role in order to restore a snapshot using the `remote_snapshot` type. <br /><br > Defaults to `local`. `storage_type` | `local` indicates that all snapshot metadata and index data will be downloaded to local storage. <br /><br > `remote_snapshot` indicates that snapshot metadata will be downloaded to the cluster, but the remote repository will remain the authoritative store of the index data. Data will be downloaded and cached as necessary to service queries. At least one node in the cluster must be configured with the `search` node role in order to restore a snapshot using the `remote_snapshot` type. <br /><br > Defaults to `local`.
#### Example request
The following request restores the index `my-index` from the snapshot `my-snapshot` as a searchable snapshot:
````json
POST /_snapshot/my-repository/my-snapshot/_restore
{
"storage_type": "remote_snapshot",
"indices": "my-index"
}
````
Similar to all snapshot restore requests, you can include or exclude certain indexes or specify additional snapshot settings. For more information, see the [restore snapshots API]({{site.url}}{{site.baseurl}}/opensearch/snapshots/snapshot-restore/#restore-snapshots).
## Listing indexes ## Listing indexes
To determine whether an index is a searchable snapshot index, look for a store type with the value of `remote_snapshot`: To determine whether an index is a searchable snapshot index, look for a store type with the value of `remote_snapshot`: