我知道_stats
API提供了一个或多个索引的索引级别统计信息。我对store
参数特别感兴趣,它是以字节为单位的索引大小。我想计算的字节大小为索引中的给定类型,但是我如何计算弹性搜索索引内给定类型的统计信息
curl http://localhost:9200/myIndex/_stats/indexing?types=myType
字节不会返回大小myType
。是否有一个API会给我的统计数据,会陈述:myType
是Xgb的大小,并代表myIndex
Y%?
我知道_stats
API提供了一个或多个索引的索引级别统计信息。我对store
参数特别感兴趣,它是以字节为单位的索引大小。我想计算的字节大小为索引中的给定类型,但是我如何计算弹性搜索索引内给定类型的统计信息
curl http://localhost:9200/myIndex/_stats/indexing?types=myType
字节不会返回大小myType
。是否有一个API会给我的统计数据,会陈述:myType
是Xgb的大小,并代表myIndex
Y%?
您需要使用/store
子路径,而不是像这样/indexing
副路径:
curl http://localhost:9200/myIndex/_stats/store?types=myType
^
|
use "store" here
,你会得到在
{
"_shards" : {
"total" : 15,
"successful" : 15,
"failed" : 0
},
"_all" : {
"primaries" : {
"store" : {
"size_in_bytes" : 2250058413,
"throttle_time_in_millis" : 0
}
},
"total" : {
"store" : {
"size_in_bytes" : 2250058413,
"throttle_time_in_millis" : 0
}
}
},
"indices" : {
"myIndex" : {
"primaries" : {
"store" : {
"size_in_bytes" : 1444291,
"throttle_time_in_millis" : 0
}
},
"total" : {
"store" : {
"size_in_bytes" : 1444291,
"throttle_time_in_millis" : 0
}
}
},
...
}
}
store
数据你有兴趣
以上仅适用于索引。您正在指定类型,但您仍然可以看到所有类型的商店。