Elasticsearch 7.0 Cookbook(Fourth Edition)
上QQ阅读APP看书,第一时间看更新

There's more...

You can pass several additional parameters to the ForceMerge call, such as the following:

  • max_num_segments: The default value is autodetect. For full optimization, set this value to 1.
  • only_expunge_deletes: The default value is false. Lucene does not delete documents from segments, but it marks them as deleted. This flag only merges segments that have been deleted.
  • flush: The default value is true. Elasticsearch performs a flush after a ForceMerge.
  • wait_for_merge: The default value is true. If the request needs to wait, then the merge ends.