Elasticsearch refresh and fresh feature carding
Refresh
The operation record in the translog is not purged, and the translog is emptied only after the data is written to disk from the filesystem cache.
Execute refresh manually: call _ refresh to implement memory-> file system caching immediately, so that documents can be searched immediately. # single indexPOST / twitter/_refresh# multiple indexPOST / index01,index02/_refresh# all indexPOST / _ refresh reference figure
Fresh
The process of writing to disk from filesystem cache is flush.
Manual execution of fresh:# single indexPOST / twitter/_fresh# multiple indexPOST / index01,index02/_fresh# all indexPOST / _ fresh conditions for triggering fresh each shard of 1:es performs a flush operation every 30 minutes; 2: when the translog file size is larger than 512MB, flush;3 is initiated: every time index, bulk, delete, update is completed, flush translog is triggered to disk Core configuration item: 1:index.translog.flush_threshold_ops: a flush is performed when many operations occur. The default is unlimited. 2:index.translog.flush_threshold_size: a flush operation occurs when the size of the translog reaches this value. The default is 512mb. 3:index.translog.flush_threshold_period: if no flush operation is performed within the specified time interval, a forced flush operation will be performed. The default is 30m. 4:index.translog.interval: how often will translog be checked to perform a flush operation.