You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Scale API allows you to enable or disable the `search_only` mode on an index. When an index is in `search_only` mode, it retains only its search replicas and scales down primary and regular replica shards. This optimization helps reduce resource consumption during periods of low write activity while maintaining search capabilities.
13
+
14
+
This feature supports scenarios such as scale-to-zero deployments and reader/writer separation patterns, which can significantly improve resource utilization and reduce costs in production environments.
15
+
16
+
If you are using the Security plugin, you must have the `manage index` privileges.
17
+
{: .note}
18
+
19
+
## Endpoints
20
+
21
+
```json
22
+
POST /<index>/_scale
23
+
```
24
+
25
+
## Path parameters
26
+
27
+
The following table lists the available path parameters.
28
+
29
+
| Parameter | Required | Data type | Description |
30
+
| :--- | :--- | :--- | :--- |
31
+
|`index`|**Required**| String | The name of the index to scale. Wildcards are not supported. |
32
+
33
+
## Request body fields
34
+
35
+
The following table lists the available request body fields.
36
+
37
+
| Field | Required | Data type | Description |
38
+
| :--- | :--- | :--- | :--- |
39
+
|`search_only`|**Required**| Boolean | When `true`, enables search-only mode on the index. When `false`, disables search-only mode and restores the index to normal operations. |
40
+
41
+
## Example requests
42
+
43
+
### Enable search-only mode
44
+
45
+
The following request enables search-only mode for an index named `my-index`:
46
+
47
+
```json
48
+
POST /my-index/_scale
49
+
{
50
+
"search_only": true
51
+
}
52
+
```
53
+
{% include copy-curl.html %}
54
+
55
+
### Disable search-only mode
56
+
57
+
The following request disables search-only mode and returns the index to normal operations:
0 commit comments