Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public class CreateIndexClusterStateUpdateRequest extends ClusterStateUpdateRequ

private ActiveShardCount waitForActiveShards = ActiveShardCount.DEFAULT;

private boolean performReroute = true;

public CreateIndexClusterStateUpdateRequest(String cause, String index, String providedName) {
this.cause = cause;
this.index = index;
Expand Down Expand Up @@ -175,6 +177,15 @@ public CreateIndexClusterStateUpdateRequest dataStreamName(String dataStreamName
return this;
}

public boolean performReroute() {
return performReroute;
}

public CreateIndexClusterStateUpdateRequest performReroute(boolean performReroute) {
this.performReroute = performReroute;
return this;
}

@Override
public String toString() {
return "CreateIndexClusterStateUpdateRequest{"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ static CreateIndexClusterStateUpdateRequest prepareCreateIndexRequest(
.settings(b.build())
.aliases(createIndexRequest.aliases())
.waitForActiveShards(ActiveShardCount.NONE) // not waiting for shards here, will wait on the alias switch operation
.mappings(createIndexRequest.mappings());
.mappings(createIndexRequest.mappings())
.performReroute(false);
}

/**
Expand Down
Loading