Api to get indexing rate

Hi Team,

Is there any api to get indexing rate of an index ?
When i use stats api i get only these, even for he current index.
"indexing": {
"index_total": 2440,
"index_time_in_millis": 936,
"index_current": 0,
"index_failed": 0,
"delete_total": 0,
"delete_time_in_millis": 0,
"delete_current": 0,
"noop_update_total": 0,
"is_throttled": false,
"throttle_time_in_millis": 0
}
Thanks
Vishnu

Hi,

this is not available directly but you can call that API every N seconds and calculate the difference in indexed documents. Say you call the API twice and get:

  • At second 20: index_total = 3700
  • At second 25: index_total = 17700

then you can calculate the indexing throughput as (17700 - 3700) / (25 - 20) = 14000 / 5 = 2800 documents / s. If you do that in a loop you can calculate the indexing throughput over time.

Daniel

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.