1、indice stat
indice stat对index上发生的不同类型的操作都提供了统计。这个api提供了index level的统计信息,不过大多数统计信息也可以从node level获取。
curl -H "Content-Type:application/json" -XGET 'http://elasticsearch02:9200/twitter/_stats?pretty'
这里包括了doc数量,index size,segment的内存使用量,merge,flush,refresh,translog等底层机制的统计信息。
curl -H "Content-Type:application/json" -XPOST 'http://elasticsearch02:9200/twitter/_doc/1?pretty' -d '
{
"message": "this is my first twitter",
"user_name": "leo"
}'
2、segment
查看low level的lucene的segment信息,可以用来查看shard和index的更多的信息,包括一些优化信息,因为delete而浪费的数据空间,等等。
curl -H "Content-Type:application/json" -XGET 'http://elasticsearch02:9200/twitter/_segments?pretty'
{
...
"_3": {
"generation"