Skip to main content
Metrics type: Supporting MetricsCategory: Indexing

At a glance

The average time a single refresh operation takes, in milliseconds, computed as indices.refresh.total_time_in_millis / indices.refresh.total. A refresh is what makes newly indexed documents searchable: it flushes the in-memory buffer into a new Lucene segment. A climbing average means refreshes are getting slower, which usually means segments are stacking up faster than merges can consolidate them, or disk I/O is struggling to keep pace. Slow refreshes delay how quickly new or updated documents appear in search results and are an early warning of indexing-side strain.

Calculation

The metric is a delta ratio over the one-hour window:
Using deltas rather than the raw cumulative ratio matters: the raw counters accumulate since the node started, so dividing them gives a lifetime average that masks a recent regression. The hourly delta shows what refreshes are costing right now. Why this number climbs: a refresh opens a new Lucene segment from the in-memory indexing buffer. Each refresh therefore creates a new (usually small) segment. Background merges continuously consolidate small segments into larger ones to keep the segment count manageable. When indexing is heavy and merges cannot keep up, the segment count balloons, every refresh has more existing segments to account for, and the per-refresh time creeps up. Slow disks compound this because both refresh and the merges behind it are I/O-bound. The > 1000ms alert is set where the delay starts to be felt in search freshness and where it reliably indicates the merge pipeline is falling behind.

Worked example

A platform team runs an Elasticsearch cluster that ingests a product catalogue feed plus a high-volume clickstream into time-based indices. On 03 Jun 26 the Avg Index Refresh Time card has drifted from a baseline of ~120ms to 1,340ms over the past hour and trips the alert. Pulling GET /_stats/refresh deltas for the busiest index: The products index is fine; the regression is entirely in clickstream-2026.06.03. The team checks segment counts with GET /_cat/segments/clickstream-2026.06.03?v and finds the shard holding 480 segments, far above the healthy double-digit range.
The team applies a two-part fix. For the clickstream index, which does not need one-second freshness, they raise index.refresh_interval from 1s to 30s, cutting refresh frequency 30-fold and letting merges catch up. They also move the index’s data to gp3 volumes with higher provisioned IOPS so the merge pipeline is no longer I/O-starved. Within two hours the segment count falls to 60 and the average refresh time settles back to ~140ms.
Three takeaways:
  1. Refresh time is an indexing-health canary. It climbs before search latency does, because the segment proliferation that slows refreshes also eventually slows queries. Catching it here gives you a head start.
  2. The lever is usually refresh_interval, scoped per index. Not every index needs one-second freshness. Analytical and log indices tolerate 30s happily; only user-facing search indices need sub-second refresh. Tune per index, not globally.
  3. Disk I/O is the silent partner. Refresh and the merges behind it are I/O-bound. A refresh-time regression on slow disks is often really a disk problem wearing an indexing costume.

Sibling cards

Reconciling against the source

Where to look in Elasticsearch itself:
GET /_stats/refresh for cluster-wide refresh.total and refresh.total_time_in_millis; GET /<index>/_stats/refresh to scope to one index. The card computes the same ratio over a delta. GET /_cat/segments/<index>?v shows the segment count per shard, the usual cause of a rising number. GET /_cat/shards/<index>?v&h=index,shard,prirep,segments.count gives a quick per-shard view. GET /<index>/_settings?filter_path=**.refresh_interval confirms the configured refresh interval, and GET /_nodes/stats/indices/merges shows whether merges are keeping up.
Why our number may legitimately differ from a manual reading: Cross-connector reconciliation:

Known limitations / FAQs

What is the difference between refresh, flush, and merge? Three distinct lifecycle stages. A refresh opens the in-memory indexing buffer as a new searchable Lucene segment (default every 1s); this is what makes new docs searchable. A flush fsyncs the translog to disk for durability and clears it. A merge is a background job that consolidates many small segments into fewer larger ones. This card measures only refresh time. Slow refreshes usually trace back to merges falling behind, but the counters are separate. My refresh time climbed but indexing volume did not change. Why? Look at disk I/O first. Refresh and the merges behind it are I/O-bound, so a degraded volume (noisy neighbour on shared storage, exhausted burst credits on gp2, a failing disk) slows refreshes even at constant load. Check GET /_nodes/stats/fs and the host’s disk-utilisation metrics. A second possibility is a mapping change that added expensive fields (high-cardinality keywords, many sub-fields) which makes each segment more costly to build. Can I just raise refresh_interval to fix this? Often yes, and it is the most effective lever, but it is a trade-off, not a free win. A longer interval means fewer, larger refreshes (less merge pressure, lower refresh time) at the cost of search freshness: new documents take up to the interval to become searchable. Raise it for analytical and log indices that do not need sub-second freshness; keep it low for user-facing search indices. Set it per index, never blindly cluster-wide. Does this card include the replicas? By default the aggregate spans primaries and replicas, since replicas refresh independently to stay searchable. If a regression appears only on replica shards, suspect those nodes’ disks specifically. You can scope GET /<index>/_stats/refresh and inspect per-shard segment counts to isolate primary-vs-replica behaviour. The number dropped to near zero suddenly. Is that good? Check whether a node restarted. The underlying counters are cumulative since node start, so a restart resets them and the next hourly delta is computed from a near-empty base, which can read artificially low for the first hour. It can also mean indexing genuinely stopped (no new docs means few refreshes). Pair with Indexing Rate (docs/sec) to tell the two apart. How does refresh time relate to search latency? They share a root cause: segment proliferation. Too many segments make every refresh more expensive and also force searches to consult more segments per query, raising latency. So a rising refresh time is often an early warning that search latency will follow if merges do not catch up. If you see refresh time climbing, check Search Latency p95 (ms) and the segment count before it becomes a read-side problem too. Is a high refresh time ever expected and acceptable? During a large bulk reindex with refresh_interval set to -1 (refresh disabled), you may see a single very expensive refresh when it is re-enabled, because all the accumulated buffer flushes at once. That is intentional and a known reindex pattern. Outside such deliberate bulk loads, a sustained average over 1,000ms warrants investigation.

Tracked live in Vortex IQ Nerve Centre

Avg Index Refresh Time (ms) is one of hundreds of KPI pulses Vortex IQ tracks across Elasticsearch and 70+ other ecommerce connectors. Nerve Centre runs the detection layer; Vortex Mind investigates the cause when something moves; Ask Viq lets you interrogate any number in plain English. Start for free or book a demo to see this metric running on your own data.