[ElasticSearch] Refresh/Flush/Optimize - by elasticsearch.org
Elastic/Elasticsearch 2014. 8. 4. 17:48원본) http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/inside-a-shard.html
1. near real-time search
refresh
apiedit
In Elasticsearch, this lightweight process of writing and opening a new segment is called a refresh. By default, every shard is refreshed automatically once every second. This is why we say that Elasticsearch has near real-time search: document changes are not visible to search immediately, but will become visible within one second.
2. making changes persistent
flush
apiedit
The action of performing a commit and truncating the translog is known in Elasticsearch as a flush. Shards are flushed automatically every 30 minutes, or when the translog becomes too big. See thetranslog
documentation for settings that can be used to control these thresholds.
3. segment merging
optimize
apiedit
The optimize
API is best described as the forced merge API. It forces a shard to be merged down to the number of segments specified in the max_num_segments
parameter. The intention is to reduce the number of segments (usually to 1) in order to speed up search performance.