**同步结果摘要**: | 目录 | 同步前 | 同步后 | 官方 | |------|--------|--------|------| | 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 个英文文档文件** - 已有文件保持不变(未覆盖)
4.7 KiB
layout, title, parent, nav_order
| layout | title | parent | nav_order |
|---|---|---|---|
| default | CAT PIT segments | CAT APIs | 46 |
CAT Pit Segments API
Introduced 2.4 {: .label .label-purple }
The CAT Point in Time (PIT) segments operation provides low-level information about the disk utilization of a PIT by describing its Lucene segments. The PIT Segments API supports listing segment information for a specific PIT by ID or for all PITs at once.
Endpoints
GET /_cat/pit_segments
GET /_cat/pit_segments/_all
Query parameters
The following table lists the available query parameters. All query parameters are optional.
| Parameter | Data type | Description | Default |
|---|---|---|---|
bytes |
String | The units used to display byte values. Valid values are: b, kb, k, mb, m, gb, g, tb, t, pb, and p. |
N/A |
format |
String | A short version of the Accept header, such as json or yaml. Valid values are: cbor, json, smile, text, and yaml. |
text |
h |
List | A comma-separated list of column names to display. | N/A |
help |
Boolean | Returns help information. | false |
limit |
Integer | The maximum number of rows to return. Must be greater than 0. Applied after sorting (s). |
N/A |
s |
List | A comma-separated list of column names or column aliases to sort by. | N/A |
v |
Boolean | Enables verbose mode, which displays column headers. | false |
Request body fields
| Field | Data type | Description |
|---|---|---|
pit_id |
Base64-encoded binary or an array of binaries | The PIT IDs of the PITs whose segments are to be listed. Required. |
Example request: PIT segments for all PITs
{% capture step1_rest %} GET /_cat/pit_segments/_all {% endcapture %}
{% capture step1_python %}
response = client.cat.all_pit_segments() {% endcapture %}
{% include code-block.html rest=step1_rest python=step1_python %}
If there are no segments (there is no data stored), the API does not return any information.
Example request: PIT segments for PITs by ID
To list segments for one or several PITs, specify their PIT IDs in the request body:
{% capture step1_rest %} GET /_cat/pit_segments { "pit_id": [ "o463QQEPbXktaW5kZXgtMDAwMDAxFkhGN09fMVlPUkVPLXh6MUExZ1hpaEEAFjBGbmVEZHdGU1EtaFhhUFc4ZkR5cWcAAAAAAAAAAAEWaXBPNVJtZEhTZDZXTWFFR05waXdWZwEWSEY3T18xWU9SRU8teHoxQTFnWGloQQAA", "o463QQEPbXktaW5kZXgtMDAwMDAxFkhGN09fMVlPUkVPLXh6MUExZ1hpaEEAFjBGbmVEZHdGU1EtaFhhUFc4ZkR5cWcAAAAAAAAAAAIWaXBPNVJtZEhTZDZXTWFFR05waXdWZwEWSEY3T18xWU9SRU8teHoxQTFnWGloQQAA" ] } {% endcapture %}
{% capture step1_python %}
response = client.cat.pit_segments( body = { "pit_id": [ "o463QQEPbXktaW5kZXgtMDAwMDAxFkhGN09fMVlPUkVPLXh6MUExZ1hpaEEAFjBGbmVEZHdGU1EtaFhhUFc4ZkR5cWcAAAAAAAAAAAEWaXBPNVJtZEhTZDZXTWFFR05waXdWZwEWSEY3T18xWU9SRU8teHoxQTFnWGloQQAA", "o463QQEPbXktaW5kZXgtMDAwMDAxFkhGN09fMVlPUkVPLXh6MUExZ1hpaEEAFjBGbmVEZHdGU1EtaFhhUFc4ZkR5cWcAAAAAAAAAAAIWaXBPNVJtZEhTZDZXTWFFR05waXdWZwEWSEY3T18xWU9SRU8teHoxQTFnWGloQQAA" ] } )
{% endcapture %}
{% include code-block.html rest=step1_rest python=step1_python %}
Example response
index shard prirep ip segment generation docs.count docs.deleted size size.memory committed searchable version compound
index1 0 r 10.212.36.190 _0 0 4 0 3.8kb 1364 false true 8.8.2 true
index1 1 p 10.212.36.190 _0 0 3 0 3.7kb 1364 false true 8.8.2 true
index1 2 r 10.212.74.139 _0 0 2 0 3.6kb 1364 false true 8.8.2 true