NOTE
Elasticsearch Flush
What a flush does to Lucene commits and the transaction log, and how it differs from refresh.
This is a historical learning note and may contain outdated or incomplete understanding.
A flush creates a durable Lucene commit point for shard index state and allows older transaction-log generations to be retired according to Elasticsearch recovery rules.
Flush is not the same as refresh. Refresh makes recently indexed data searchable by opening new search-visible segments/readers; flush is primarily a persistence/recovery boundary.
Elasticsearch normally manages flushing automatically. Manually forcing frequent flushes can add I/O and segment-management cost, so use it only for a concrete operational reason.