Get segment information | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Path parameters
- index
string | array[string] Required
A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*
). To target all data streams and indices, omit this parameter or use*
or_all
.
Query parameters
- The unit used to display byte values.
Values areb
,kb
,mb
,gb
,tb
, orpb
. - List of columns to appear in the response. Supports simple wildcards.
- List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:asc
or:desc
as a suffix to the column name. - If
true
, the request computes the list of selected nodes from the local cluster state. Iffalse
the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node. - Period to wait for a connection to the master node.
Responses
- 200 application/json
Hide response attributes Show response attributes object- The shard name.
- The shard type:
primary
orreplica
. - The IP address of the node where it lives.
- The segment name, which is derived from the segment generation and used internally to create file names in the directory of the shard.
- The segment generation number. Elasticsearch increments this generation number for each segment written then uses this number to derive the segment name.
- The number of documents in the segment. This excludes deleted documents and counts any nested documents separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.
- The number of deleted documents in the segment, which might be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the automatic merge process if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.
size number | string
- If
true
, the segment is synced to disk. Segments that are synced can survive a hard reboot. Iffalse
, the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start. - If
true
, the segment is searchable. Iffalse
, the segment has most likely been written to disk but needs a refresh to be searchable. - If
true
, the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.