Add documentation for Searchable Snapshots GA release (#3462)
* Add documentation for Searchable Snapshots GA release Signed-off-by: ariamarble <armarble@amazon.com> * SS updates Signed-off-by: ariamarble <armarble@amazon.com> * content update Signed-off-by: ariamarble <armarble@amazon.com> * Apply suggestions from doc review Co-authored-by: Melissa Vagi <105296784+vagimeli@users.noreply.github.com> * Update _tuning-your-cluster/availability-and-recovery/snapshots/searchable_snapshot.md * Apply suggestions from editorial review Co-authored-by: Nathan Bower <nbower@amazon.com> * Update _tuning-your-cluster/availability-and-recovery/snapshots/searchable_snapshot.md --------- Signed-off-by: ariamarble <armarble@amazon.com> Co-authored-by: Melissa Vagi <105296784+vagimeli@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
This commit is contained in:
parent
165e4cbc18
commit
25edf6653d
|
@ -10,67 +10,26 @@ redirect_from:
|
||||||
|
|
||||||
# Searchable snapshots
|
# Searchable snapshots
|
||||||
|
|
||||||
Searchable snapshots is an experimental feature released in OpenSearch 2.4. Therefore, we do not recommend the use of this feature in a production environment. For updates on progress, follow us on [GitHub](https://github.com/opensearch-project/OpenSearch/issues/3739). If you have any feedback please [submit a new issue](https://github.com/opensearch-project/OpenSearch/issues/new/choose).
|
A searchable snapshot index reads data from a [snapshot repository]({{site.url}}{{site.baseurl}}/opensearch/snapshots/snapshot-restore/#register-repository) on demand in real time (at search time) rather than downloading all index data to cluster storage at restore time. Because the index data remains in the snapshot format in the repository, searchable snapshot indexes are inherently read-only. Any attempt to write to a searchable snapshot index results in an error.
|
||||||
{: .warning }
|
|
||||||
|
|
||||||
A searchable snapshot is an index where data is read from a [snapshot repository]({{site.url}}{{site.baseurl}}/opensearch/snapshots/snapshot-restore/#register-repository) on demand at search time rather than all index data being downloaded to cluster storage at restore time. Because the index data remains in the snapshot format in the repository, searchable snapshot indexes are inherently read-only. Any attempt to write to a searchable snapshot index will result in an error.
|
The searchable snapshot feature incorporates techniques like caching frequently used data segments in cluster nodes and removing the least used data segment from the cluster nodes to make space for frequently used data segments. The data segments downloaded from snapshots on block storage reside alongside the general indexes of the cluster nodes. As such, the computing capacity of cluster nodes is shared between indexing, local search, and data segments on a snapshot residing on lower-cost object storage like Amazon Simple Storage Service (Amazon S3). While cluster node resources are utilized much more efficiently, the high number of tasks results in slower and longer snapshot searches. The local storage of the node is also used for caching the snapshot data.
|
||||||
|
|
||||||
To enable the searchable snapshots feature, reference the following steps.
|
## Configuring a node to use searchable snapshots
|
||||||
|
|
||||||
## Enabling the feature flag
|
To configure the searchable snapshots feature, create a node in your opensearch.yml file and define the node role as `search`:
|
||||||
|
|
||||||
There are several methods for enabling searchable snapshots, depending on the installation type.
|
|
||||||
|
|
||||||
### Enable on a node using a tarball installation
|
|
||||||
|
|
||||||
The flag is toggled using a new jvm parameter that is set either in `OPENSEARCH_JAVA_OPTS` or in config/jvm.options:
|
|
||||||
|
|
||||||
- Option 1: Update config/jvm.options by adding the following line:
|
|
||||||
|
|
||||||
```json
|
|
||||||
-Dopensearch.experimental.feature.searchable_snapshot.enabled=true
|
|
||||||
```
|
|
||||||
|
|
||||||
- Option 2: Use the `OPENSEARCH_JAVA_OPTS` environment variable:
|
|
||||||
|
|
||||||
```json
|
|
||||||
export OPENSEARCH_JAVA_OPTS="-Dopensearch.experimental.feature.searchable_snapshot.enabled=true"
|
|
||||||
```
|
|
||||||
- Option 3: For developers using Gradle, update run.gradle by adding the following lines:
|
|
||||||
|
|
||||||
```json
|
|
||||||
testClusters {
|
|
||||||
runTask {
|
|
||||||
testDistribution = 'archive'
|
|
||||||
if (numZones > 1) numberOfZones = numZones
|
|
||||||
if (numNodes > 1) numberOfNodes = numNodes
|
|
||||||
systemProperty 'opensearch.experimental.feature.searchable_snapshot.enabled', 'true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- Finally, create a node in your opensearch.yml file and define the node role as `search`:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node.name: snapshots-node
|
node.name: snapshots-node
|
||||||
node.roles: [ search ]
|
node.roles: [ search ]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Enable with Docker containers
|
If you're running Docker, you can create a node with the `search` node role by adding the line `- node.roles: [ search ]` to your docker-compose.yml file:
|
||||||
|
|
||||||
If you're running Docker, add the following line to docker-compose.yml underneath the `opensearch-node` and `environment` sections:
|
|
||||||
|
|
||||||
```json
|
|
||||||
OPENSEARCH_JAVA_OPTS="-Dopensearch.experimental.feature.searchable_snapshot.enabled=true" # Enables searchable snapshot
|
|
||||||
```
|
|
||||||
|
|
||||||
To create a node with the `search` node role, add the line `- node.roles: [ search ]` to your docker-compose.yml file:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
opensearch-node1:
|
opensearch-node1:
|
||||||
image: opensearchproject/opensearch:2.4.0
|
image: opensearchproject/opensearch:2.7.0
|
||||||
container_name: opensearch-node1
|
container_name: opensearch-node1
|
||||||
environment:
|
environment:
|
||||||
- cluster.name=opensearch-cluster
|
- cluster.name=opensearch-cluster
|
||||||
|
|
Loading…
Reference in New Issue