From 2130e3f3e4ef2963a67b866e8d577f183c928b79 Mon Sep 17 00:00:00 2001 From: Rishikesh1159 Date: Thu, 11 May 2023 14:21:40 +0000 Subject: [PATCH] set default replication strategy as SEGMENT. Signed-off-by: Rishikesh1159 --- .../java/org/opensearch/cluster/metadata/IndexMetadata.java | 2 +- .../opensearch/indices/replication/common/ReplicationType.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java index 4ca79541637b1..23f4de667bf7a 100644 --- a/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java +++ b/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java @@ -284,7 +284,7 @@ public Iterator> settings() { public static final String SETTING_REPLICATION_TYPE = "index.replication.type"; public static final Setting INDEX_REPLICATION_TYPE_SETTING = new Setting<>( SETTING_REPLICATION_TYPE, - ReplicationType.DOCUMENT.toString(), + ReplicationType.SEGMENT.toString(), ReplicationType::parseString, Property.IndexScope, Property.Final diff --git a/server/src/main/java/org/opensearch/indices/replication/common/ReplicationType.java b/server/src/main/java/org/opensearch/indices/replication/common/ReplicationType.java index ac4840e390c0b..d13158d700a92 100644 --- a/server/src/main/java/org/opensearch/indices/replication/common/ReplicationType.java +++ b/server/src/main/java/org/opensearch/indices/replication/common/ReplicationType.java @@ -26,7 +26,7 @@ public static ReplicationType parseString(String replicationType) { throw new IllegalArgumentException("Could not parse ReplicationStrategy for [" + replicationType + "]"); } catch (NullPointerException npe) { // return a default value for null input - return DOCUMENT; + return SEGMENT; } } }