While the Apache Lucene’s documents explicitly indicates that:
Flushing just moves the internal buffered state in IndexWriter into the index, but these changes are not visible to IndexReader until either commit() or close() is called. A flush may also trigger one or more segment merges which by default run with a background thread so as not to block the addDocument calls
Elasticsearch uses a Refresh (which triggers a Lucene flush under the hood) to make data searchable! As much as I try to understand the difference and possible side actions in the Refresh operation, I get more confused.
Read more here: Source link