Skip to content

Perform force merge only on primary shard of the index #8021

@sohami

Description

@sohami

Is your feature request related to a problem? Please describe.
Currently, force merge works on both primary and replica shards by default. It doesn't provide option to merge primary shard only. For some cases, it will be beneficial if users don't want the replica shards to be merged to avoid resource utilization on replica nodes and only limit it to primary shards. For example: With support of searchable snapshot for better search performance user would want to merge the segments to 1 or fewer number before taking snapshot of the index. Using ISM users can
trigger force merge on primary shard only and then take snapshot to use it later using searchable snapshot mechanism to have better query performance.

Describe the solution you'd like
Force merge request to provide option to merge primary only shard.

Describe alternatives you've considered

  1. Index settings to control for which indices primary shard should be merged

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexingIndexing, Bulk Indexing and anything related to indexingdistributed frameworkenhancementEnhancement or improvement to existing feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions