Files
honeymoose f321dfedf5 同步完成!
**同步结果摘要**:

| 目录 | 同步前 | 同步后 | 官方 |
|------|--------|--------|------|
| aggregations | 40 | 65 | 64 |
| analyzers | 8 | 141 | 140 |
| api-reference | 97 | 186 | 174 |
| benchmark | 34 | 67 | 53 |
| clients | 17 | 18 | 18 |
| dashboards | 38 | 149 | 131 |
| data-prepper | 77 | 134 | 123 |
| im-plugin | 22 | 37 | 37 |
| ingest-pipelines | 27 | 52 | 51 |
| install-and-configure | 37 | 57 | 53 |
| ml-commons-plugin | 81 | 157 | 155 |
| observing-your-data | 39 | 73 | 66 |
| query-dsl | 40 | 77 | 75 |
| search-plugins | 80 | 139 | 95 |
| security-analytics | 22 | 47 | 46 |

**说明**:
- 本地文件数 > 官方:本地有一些官方已删除或重命名的文件
- 新增了约 **740 个英文文档文件**
- 已有文件保持不变(未覆盖)
2026-11-30 10:48:30 -05:00

2.0 KiB

layout, title, parent, grand_parent, nav_order
layout title parent grand_parent nav_order
default Scale Index operations Index APIs 80

Scale API

Introduced 3.0 {: .label .label-purple }

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.

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.

If you are using the Security plugin, you must have the manage index privileges. {: .note}

Endpoints

POST /{index}/_scale

Path parameters

The following table lists the available path parameters.

Parameter Required Data type Description
index Required String The name of the index to scale. Wildcards are not supported.

Request body fields

The following table lists the available request body fields.

Field Required Data type Description
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.

Example request: Enabling search-only mode

The following request enables search-only mode for an index named my-index:

POST /my-index/_scale
{
  "search_only": true
}

{% include copy-curl.html %}

Example request: Disabling search-only mode

The following request disables search-only mode and returns the index to normal operations:

POST /my-index/_scale
{
  "search_only": false
}

{% include copy-curl.html %}

Example response

The API returns the following response:

{
  "acknowledged": true
}