Get index information
Generally available
All methods and paths for this operation:
Get high-level information about indices in a cluster, including backing indices for data streams.
Use this request to get the following information for each index in a cluster:
- shard count
- document count
- deleted document count
- primary store size
- total store size of all shards, including shard replicas
These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs.
CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
Required authorization
- Index privileges:
monitor
- Cluster privileges:
monitor
Path parameters
-
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 are
b
,kb
,mb
,gb
,tb
, orpb
. -
The type of index that wildcard patterns can match.
Supported values include:
all
: Match any data stream or index, including hidden ones.open
: Match open, non-hidden indices. Also matches any non-hidden data stream.closed
: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.hidden
: Match hidden data streams and hidden indices. Must be combined withopen
,closed
, orboth
.none
: Wildcard expressions are not accepted.
Values are
all
,open
,closed
,hidden
, ornone
. -
The health status used to limit returned indices. By default, the response includes indices of any health status.
Supported values include:
green
(orGREEN
): All shards are assigned.yellow
(orYELLOW
): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red
(orRED
): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknown
unavailable
Values are
green
,GREEN
,yellow
,YELLOW
,red
,RED
,unknown
, orunavailable
. -
If true, the response includes information from segments that are not loaded into memory.
-
If true, the response only includes information from primary shards.
-
The unit used to display time values.
Values are
nanos
,micros
,ms
,s
,m
,h
, ord
. -
Period to wait for a connection to the master node.
Values are
-1
or0
. -
A comma-separated list of columns names to display. It supports simple wildcards.
Supported values include:
health
(orh
): The current health status.status
(ors
): The open/close status.index
(ori
,idx
): The index name.uuid
(orid
,uuid
): The index UUID.pri
(orp
,shards.primary
,shardsPrimary
): The number of primary shards.rep
(orr
,shards.replica
,shardsReplica
): The number of replica shards.docs.count
(ordc
,docsCount
): The number of available documents.docs.deleted
(ordd
,docsDeleted
): The number of deleted documents.creation.date
(orcd
): The index creation date (millisecond value).creation.date.string
(orcds
): The index creation date (as string).store.size
(orss
,storeSize
): The store size of primaries and replicas.pri.store.size
: The store size of primaries.dataset.size
: The total size of the dataset.completion.size
(orcs
,completionSize
): The size of completion for primaries and replicas.pri.completion.size
: The size of completion for primaries.fielddata.memory_size
(orfm
,fielddataMemory
): The used fielddata cache for primaries and replicas.pri.fielddata.memory_size
: The used fielddata cache for primaries.fielddata.evictions
(orfe
,fielddataEvictions
): The number of fielddata evictions for primaries and replicas.pri.fielddata.evictions
: The number of fielddata evictions for primaries.query_cache.memory_size
(orqcm
,queryCacheMemory
): The used query cache for primaries and replicas.pri.query_cache.memory_size
: The used query cache for primaries.query_cache.evictions
(orqce
,queryCacheEvictions
): The number of query cache evictions for primaries and replicas.pri.query_cache.evictions
: The number of query cache evictions for primaries.request_cache.memory_size
(orrcm
,requestCacheMemory
): The used request cache for primaries and replicas.pri.request_cache.memory_size
: The used request cache for primaries.request_cache.evictions
(orrce
,requestCacheEvictions
): The number of request cache evictions for primaries and replicas.pri.request_cache.evictions
: The number of request cache evictions for primaries.request_cache.hit_count
(orrchc
,requestCacheHitCount
): The request cache hit count for primaries and replicas.pri.request_cache.hit_count
: The request cache hit count for primaries.request_cache.miss_count
(orrcmc
,requestCacheMissCount
): The request cache miss count for primaries and replicas.pri.request_cache.miss_count
: The request cache miss count for primaries.flush.total
(orft
,flushTotal
): The number of flushes for primaries and replicas.pri.flush.total
: The number of flushes for primaries.flush.total_time
(orftt
,flushTotalTime
): The time spent in flush for primaries and replicas.pri.flush.total_time
: The time spent in flush for primaries.get.current
(orgc
,getCurrent
): The number of current get operations for primaries and replicas.pri.get.current
: The number of current get operations for primaries.get.time
(orgti
,getTime
): The time spent in get for primaries and replicas.pri.get.time
: The time spent in get for primaries.get.total
(orgto
,getTotal
): The number of get operations for primaries and replicas.pri.get.total
: The number of get operations for primaries.get.exists_time
(orgeti
,getExistsTime
): The time spent in successful gets for primaries and replicas.pri.get.exists_time
: The time spent in successful gets for primaries.get.exists_total
(orgeto
,getExistsTotal
): The number of successful gets for primaries and replicas.pri.get.exists_total
: The number of successful gets for primaries.get.missing_time
(orgmti
,getMissingTime
): The time spent in failed gets for primaries and replicas.pri.get.missing_time
: The time spent in failed gets for primaries.get.missing_total
(orgmto
,getMissingTotal
): The number of failed gets for primaries and replicas.pri.get.missing_total
: The number of failed gets for primaries.indexing.delete_current
(oridc
,indexingDeleteCurrent
): The number of current deletions for primaries and replicas.pri.indexing.delete_current
: The number of current deletions for primaries.indexing.delete_time
(oridti
,indexingDeleteTime
): The time spent in deletions for primaries and replicas.pri.indexing.delete_time
: The time spent in deletions for primaries.indexing.delete_total
(oridto
,indexingDeleteTotal
): The number of delete operations for primaries and replicas.pri.indexing.delete_total
: The number of delete operations for primaries.indexing.index_current
(oriic
,indexingIndexCurrent
): The number of current indexing operations for primaries and replicas.pri.indexing.index_current
: The number of current indexing operations for primaries.indexing.index_time
(oriiti
,indexingIndexTime
): The time spent in indexing for primaries and replicas.pri.indexing.index_time
: The time spent in indexing for primaries.indexing.index_total
(oriito
,indexingIndexTotal
): The number of indexing operations for primaries and replicas.pri.indexing.index_total
: The number of indexing operations for primaries.indexing.index_failed
(oriif
,indexingIndexFailed
): The number of failed indexing operations for primaries and replicas.pri.indexing.index_failed
: The number of failed indexing operations for primaries.indexing.index_failed_due_to_version_conflict
(oriifvc
,indexingIndexFailedDueToVersionConflict
): The number of failed indexing operations due to version conflict for primaries and replicas.pri.indexing.index_failed_due_to_version_conflict
: The number of failed indexing operations due to version conflict for primaries.merges.current
(ormc
,mergesCurrent
): The number of current merges for primaries and replicas.pri.merges.current
: The number of current merges for primaries.merges.current_docs
(ormcd
,mergesCurrentDocs
): The number of current merging documents for primaries and replicas.pri.merges.current_docs
: The number of current merging documents for primaries.merges.current_size
(ormcs
,mergesCurrentSize
): The size of current merges for primaries and replicas.pri.merges.current_size
: The size of current merges for primaries.merges.total
(ormt
,mergesTotal
): The number of completed merge operations for primaries and replicas.pri.merges.total
: The number of completed merge operations for primaries.merges.total_docs
(ormtd
,mergesTotalDocs
): The number of merged documents for primaries and replicas.pri.merges.total_docs
: The number of merged documents for primaries.merges.total_size
(ormts
,mergesTotalSize
): The merged size for primaries and replicas.pri.merges.total_size
: The merged size for primaries.merges.total_time
(ormtt
,mergesTotalTime
): The time spent in merges for primaries and replicas.pri.merges.total_time
: The time spent in merges for primaries.refresh.total
(orrto
,refreshTotal
): The total refreshes for primaries and replicas.pri.refresh.total
: The total refreshes for primaries.refresh.time
(orrti
,refreshTime
): The time spent in refreshes for primaries and replicas.pri.refresh.time
: The time spent in refreshes for primaries.refresh.external_total
(orrto
,refreshTotal
): The total external refreshes for primaries and replicas.pri.refresh.external_total
: The total external refreshes for primaries.refresh.external_time
(orrti
,refreshTime
): The time spent in external refreshes for primaries and replicas.pri.refresh.external_time
: The time spent in external refreshes for primaries.refresh.listeners
(orrli
,refreshListeners
): The number of pending refresh listeners for primaries and replicas.pri.refresh.listeners
: The number of pending refresh listeners for primaries.search.fetch_current
(orsfc
,searchFetchCurrent
): The current fetch phase operations for primaries and replicas.pri.search.fetch_current
: The current fetch phase operations for primaries.search.fetch_time
(orsfti
,searchFetchTime
): The time spent in fetch phase for primaries and replicas.pri.search.fetch_time
: The time spent in fetch phase for primaries.search.fetch_total
(orsfto
,searchFetchTotal
): The total fetch operations for primaries and replicas.pri.search.fetch_total
: The total fetch operations for primaries.search.open_contexts
(orso
,searchOpenContexts
): The open search contexts for primaries and replicas.pri.search.open_contexts
: The open search contexts for primaries.search.query_current
(orsqc
,searchQueryCurrent
): The current query phase operations for primaries and replicas.pri.search.query_current
: The current query phase operations for primaries.search.query_time
(orsqti
,searchQueryTime
): The time spent in query phase for primaries and replicas.pri.search.query_time
: The time spent in query phase for primaries.search.query_total
(orsqto
,searchQueryTotal
): The total query phase operations for primaries and replicas.pri.search.query_total
: The total query phase operations for primaries.search.scroll_current
(orscc
,searchScrollCurrent
): The open scroll contexts for primaries and replicas.pri.search.scroll_current
: The open scroll contexts for primaries.search.scroll_time
(orscti
,searchScrollTime
): The time scroll contexts held open for primaries and replicas.pri.search.scroll_time
: The time scroll contexts held open for primaries.search.scroll_total
(orscto
,searchScrollTotal
): The completed scroll contexts for primaries and replicas.pri.search.scroll_total
: The completed scroll contexts for primaries.segments.count
(orsc
,segmentsCount
): The number of segments for primaries and replicas.pri.segments.count
: The number of segments for primaries.segments.memory
(orsm
,segmentsMemory
): The memory used by segments for primaries and replicas.pri.segments.memory
: The memory used by segments for primaries.segments.index_writer_memory
(orsiwm
,segmentsIndexWriterMemory
): The memory used by index writer for primaries and replicas.pri.segments.index_writer_memory
: The memory used by index writer for primaries.segments.version_map_memory
(orsvmm
,segmentsVersionMapMemory
): The memory used by version map for primaries and replicas.pri.segments.version_map_memory
: The memory used by version map for primaries.segments.fixed_bitset_memory
(orsfbm
,fixedBitsetMemory
): The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries and replicas.pri.segments.fixed_bitset_memory
: The memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields. Applicable for primaries.warmer.current
(orwc
,warmerCurrent
): The current warmer operations for primaries and replicas.pri.warmer.current
: The current warmer operations for primaries.warmer.total
(orwto
,warmerTotal
): The total warmer operations for primaries and replicas.pri.warmer.total
: The total warmer operations for primaries.warmer.total_time
(orwtt
,warmerTotalTime
): The time spent in warmers for primaries and replicas.pri.warmer.total_time
: The time spent in warmers for primaries.suggest.current
(orsuc
,suggestCurrent
): The current suggest operations for primaries and replicas.pri.suggest.current
: The current suggest operations for primaries.suggest.time
(orsuti
,suggestTime
): The time spent in suggest for primaries and replicas.pri.suggest.time
: The time spent in suggest for primaries.suggest.total
(orsuto
,suggestTotal
): The number of suggest operations for primaries and replicas.pri.suggest.total
: The number of suggest operations for primaries.memory.total
(ortm
,memoryTotal
): The total used memory for primaries and replicas.pri.memory.total
: The total used memory for primaries.bulk.total_operations
(orbto
,bulkTotalOperation
): The number of bulk shard operations for primaries and replicas.pri.bulk.total_operations
: The number of bulk shard operations for primaries.bulk.total_time
(orbtti
,bulkTotalTime
): The time spent in shard bulk for primaries and replicas.pri.bulk.total_time
: The time spent in shard bulk for primaries.bulk.total_size_in_bytes
(orbtsi
,bulkTotalSizeInBytes
): The total size in bytes of shard bulk for primaries and replicas.pri.bulk.total_size_in_bytes
: The total size in bytes of shard bulk for primaries.bulk.avg_time
(orbati
,bulkAvgTime
): The average time spent in shard bulk for primaries and replicas.pri.bulk.avg_time
: The average time spent in shard bulk for primaries.bulk.avg_size_in_bytes
(orbasi
,bulkAvgSizeInBytes
): The average size in bytes of shard bulk for primaries and replicas.pri.bulk.avg_size_in_bytes
: The average size in bytes of shard bulk for primaries.dense_vector.value_count
(ordvc
,denseVectorCount
): The total count of indexed dense vectors for primaries and replicas.pri.dense_vector.value_count
: The total count of indexed dense vectors for primaries.sparse_vector.value_count
(orsvc
,sparseVectorCount
): The total count of indexed sparse vectors for primaries and replicas.pri.sparse_vector.value_count
: The total count of indexed sparse vectors for primaries.
Values are
health
,h
,status
,s
,index
,i
,idx
,uuid
,id
,pri
,p
,shards.primary
,shardsPrimary
,rep
,r
,shards.replica
,shardsReplica
,docs.count
,dc
,docsCount
,docs.deleted
,dd
,docsDeleted
,creation.date
,cd
,creation.date.string
,cds
,store.size
,ss
,storeSize
,pri.store.size
,dataset.size
,completion.size
,cs
,completionSize
,pri.completion.size
,fielddata.memory_size
,fm
,fielddataMemory
,pri.fielddata.memory_size
,fielddata.evictions
,fe
,fielddataEvictions
,pri.fielddata.evictions
,query_cache.memory_size
,qcm
,queryCacheMemory
,pri.query_cache.memory_size
,query_cache.evictions
,qce
,queryCacheEvictions
,pri.query_cache.evictions
,request_cache.memory_size
,rcm
,requestCacheMemory
,pri.request_cache.memory_size
,request_cache.evictions
,rce
,requestCacheEvictions
,pri.request_cache.evictions
,request_cache.hit_count
,rchc
,requestCacheHitCount
,pri.request_cache.hit_count
,request_cache.miss_count
,rcmc
,requestCacheMissCount
,pri.request_cache.miss_count
,flush.total
,ft
,flushTotal
,pri.flush.total
,flush.total_time
,ftt
,flushTotalTime
,pri.flush.total_time
,get.current
,gc
,getCurrent
,pri.get.current
,get.time
,gti
,getTime
,pri.get.time
,get.total
,gto
,getTotal
,pri.get.total
,get.exists_time
,geti
,getExistsTime
,pri.get.exists_time
,get.exists_total
,geto
,getExistsTotal
,pri.get.exists_total
,get.missing_time
,gmti
,getMissingTime
,pri.get.missing_time
,get.missing_total
,gmto
,getMissingTotal
,pri.get.missing_total
,indexing.delete_current
,idc
,indexingDeleteCurrent
,pri.indexing.delete_current
,indexing.delete_time
,idti
,indexingDeleteTime
,pri.indexing.delete_time
,indexing.delete_total
,idto
,indexingDeleteTotal
,pri.indexing.delete_total
,indexing.index_current
,iic
,indexingIndexCurrent
,pri.indexing.index_current
,indexing.index_time
,iiti
,indexingIndexTime
,pri.indexing.index_time
,indexing.index_total
,iito
,indexingIndexTotal
,pri.indexing.index_total
,indexing.index_failed
,iif
,indexingIndexFailed
,pri.indexing.index_failed
,indexing.index_failed_due_to_version_conflict
,iifvc
,indexingIndexFailedDueToVersionConflict
,pri.indexing.index_failed_due_to_version_conflict
,merges.current
,mc
,mergesCurrent
,pri.merges.current
,merges.current_docs
,mcd
,mergesCurrentDocs
,pri.merges.current_docs
,merges.current_size
,mcs
,mergesCurrentSize
,pri.merges.current_size
,merges.total
,mt
,mergesTotal
,pri.merges.total
,merges.total_docs
,mtd
,mergesTotalDocs
,pri.merges.total_docs
,merges.total_size
,mts
,mergesTotalSize
,pri.merges.total_size
,merges.total_time
,mtt
,mergesTotalTime
,pri.merges.total_time
,refresh.total
,rto
,refreshTotal
,pri.refresh.total
,refresh.time
,rti
,refreshTime
,pri.refresh.time
,refresh.external_total
,pri.refresh.external_total
,refresh.external_time
,pri.refresh.external_time
,refresh.listeners
,rli
,refreshListeners
,pri.refresh.listeners
,search.fetch_current
,sfc
,searchFetchCurrent
,pri.search.fetch_current
,search.fetch_time
,sfti
,searchFetchTime
,pri.search.fetch_time
,search.fetch_total
,sfto
,searchFetchTotal
,pri.search.fetch_total
,search.open_contexts
,so
,searchOpenContexts
,pri.search.open_contexts
,search.query_current
,sqc
,searchQueryCurrent
,pri.search.query_current
,search.query_time
,sqti
,searchQueryTime
,pri.search.query_time
,search.query_total
,sqto
,searchQueryTotal
,pri.search.query_total
,search.scroll_current
,scc
,searchScrollCurrent
,pri.search.scroll_current
,search.scroll_time
,scti
,searchScrollTime
,pri.search.scroll_time
,search.scroll_total
,scto
,searchScrollTotal
,pri.search.scroll_total
,segments.count
,sc
,segmentsCount
,pri.segments.count
,segments.memory
,sm
,segmentsMemory
,pri.segments.memory
,segments.index_writer_memory
,siwm
,segmentsIndexWriterMemory
,pri.segments.index_writer_memory
,segments.version_map_memory
,svmm
,segmentsVersionMapMemory
,pri.segments.version_map_memory
,segments.fixed_bitset_memory
,sfbm
,fixedBitsetMemory
,pri.segments.fixed_bitset_memory
,warmer.current
,wc
,warmerCurrent
,pri.warmer.current
,warmer.total
,wto
,warmerTotal
,pri.warmer.total
,warmer.total_time
,wtt
,warmerTotalTime
,pri.warmer.total_time
,suggest.current
,suc
,suggestCurrent
,pri.suggest.current
,suggest.time
,suti
,suggestTime
,pri.suggest.time
,suggest.total
,suto
,suggestTotal
,pri.suggest.total
,memory.total
,tm
,memoryTotal
,pri.memory.total
,bulk.total_operations
,bto
,bulkTotalOperation
,pri.bulk.total_operations
,bulk.total_time
,btti
,bulkTotalTime
,pri.bulk.total_time
,bulk.total_size_in_bytes
,btsi
,bulkTotalSizeInBytes
,pri.bulk.total_size_in_bytes
,bulk.avg_time
,bati
,bulkAvgTime
,pri.bulk.avg_time
,bulk.avg_size_in_bytes
,basi
,bulkAvgSizeInBytes
,pri.bulk.avg_size_in_bytes
,dense_vector.value_count
,dvc
,denseVectorCount
,pri.dense_vector.value_count
,sparse_vector.value_count
,svc
,sparseVectorCount
, orpri.sparse_vector.value_count
. -
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.
GET /_cat/indices/my-index-*?v=true&s=index&format=json
resp = client.cat.indices(
index="my-index-*",
v=True,
s="index",
format="json",
)
const response = await client.cat.indices({
index: "my-index-*",
v: "true",
s: "index",
format: "json",
});
response = client.cat.indices(
index: "my-index-*",
v: "true",
s: "index",
format: "json"
)
$resp = $client->cat()->indices([
"index" => "my-index-*",
"v" => "true",
"s" => "index",
"format" => "json",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_cat/indices/my-index-*?v=true&s=index&format=json"
[
{
"health": "yellow",
"status": "open",
"index": "my-index-000001",
"uuid": "u8FNjxh8Rfy_awN11oDKYQ",
"pri": "1",
"rep": "1",
"docs.count": "1200",
"docs.deleted": "0",
"store.size": "88.1kb",
"pri.store.size": "88.1kb",
"dataset.size": "88.1kb"
},
{
"health": "green",
"status": "open",
"index": "my-index-000002",
"uuid": "nYFWZEO7TUiOjLQXBaYJpA ",
"pri": "1",
"rep": "0",
"docs.count": "0",
"docs.deleted": "0",
"store.size": "260b",
"pri.store.size": "260b",
"dataset.size": "260b"
}
]