Elasticsearchのcat segments

Elasticsearchのcat segmentsについて記す。

公式ドキュメント cat segments を参考にした。

www.elastic.co

検証環境: Elasticsearch 6.0.0-rc1

cat segmentsはindexのシャードのsegmentに関する情報を示す。

bash-3.2$ curl -XGET 'localhost:9200/_cat/segments?v&pretty'
index         shard prirep ip        segment generation docs.count docs.deleted    size size.memory committed searchable version compound
bank          0     p      127.0.0.1 _0               0        197            0  96.2kb        8271 true      true       7.0.0   true
bank          1     p      127.0.0.1 _0               0        191            0  93.3kb        8176 true      true       7.0.0   true
bank          2     p      127.0.0.1 _0               0        211            0 101.9kb        8541 true      true       7.0.0   true
bank          3     p      127.0.0.1 _0               0        200            0  97.3kb        8365 true      true       7.0.0   true
bank          4     p      127.0.0.1 _0               0        201            0  97.7kb        8333 true      true       7.0.0   true
noindextest   3     p      127.0.0.1 _1               1          1            0   3.3kb        1409 true      true       7.0.0   true
indexusertest 3     p      127.0.0.1 _1               1          1            0   3.3kb        1409 true      true       7.0.0   true
customer      2     p      127.0.0.1 _1               1          1            0   3.4kb        1409 true      true       7.0.0   true
customer      3     p      127.0.0.1 _7               7          1            0   3.4kb        1409 true      true       7.0.0   true
bash-3.2$ curl -XGET 'localhost:9200/_cat/segments?help&pretty'
index        | i,idx                 | index name                       
shard        | s,sh                  | shard name                       
prirep       | p,pr,primaryOrReplica | primary or replica               
ip           |                       | ip of node where it lives        
id           |                       | unique id of node where it lives 
segment      | seg                   | segment name                     
generation   | g,gen                 | segment generation               
docs.count   | dc,docsCount          | number of docs in segment        
docs.deleted | dd,docsDeleted        | number of deleted docs in segment
size         | si                    | segment size in bytes            
size.memory  | sm,sizeMemory         | segment memory in bytes          
committed    | ic,isCommitted        | is segment committed             
searchable   | is,isSearchable       | is segment searched              
version      | v,ver                 | version                          
compound     | ico,isCompound        | is segment compound