我想知道在特定索引中索引(创建/更新)了多少文档。我查看了 _stats api,但没有多大意义。谁能告诉我如何计算索引率。它可以是每秒/分钟。谢谢
Elasticsearch 不直接提供这些数据,但您对 API 的看法是正确的。
在_stat
API 上,您必须查看索引操作的总数(自服务器启动以来)并存储调用它的时间:
GET _stats?filter_path=indices.index_name_here.total.indexing.index_total
{
"indices": {
"index_name_here": {
"total": {
"indexing": {
"index_total": 555
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
有时层,您将需要对相同的 API 进行第二次调用:
{
"indices": {
"index_name_here": {
"total": {
"indexing": {
"index_total": 666
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
通过一些计算,您将获得索引率:
归档时间: |
|
查看次数: |
2211 次 |
最近记录: |