I’m hoping someone can help clear up my confusion around the force_merge
operation. The docs state:
<<<<<<<<<<<<<<<<
force_merge
Reduces the number of Lucene segments by merging the indices. This operation attempts to set the index to a read-only
state before starting the merging process.
Parameter | Description | Type | Required |
---|---|---|---|
max_num_segments |
The number of segments to reduce the shard to. | number |
Yes |
<<<<<<<<<<<<<<<<
Does this operation only merge the segements in each individual shard of an index or does it also attempt to reduce the number of shards in the index? The initial description also says merging the indices
, is this correct - if so does it mean that it tries to squash indices that are in various states into a smaller number of indices?
If this operation only merges segments in a single shard then that’s fine. If it goes further can anyone explain what happens if the result were to be bigger than a single disk? Suppose a 4TB index, split over a number of shards and I gave a value of 1 to force_merge
what would happen?
Thanks