Skip to content

Commit 5e8fcab

Browse files
committed
Move setting back to IndexSettings
1 parent 65a768d commit 5e8fcab

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
173173
MapperService.INDEX_MAPPING_DIMENSION_FIELDS_LIMIT_SETTING,
174174
MapperService.INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING,
175175
MapperService.INDEX_MAPPER_DYNAMIC_SETTING,
176-
MapperService.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING,
177176
BitsetFilterCache.INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING,
178177
IndexModule.INDEX_STORE_TYPE_SETTING,
179178
IndexModule.INDEX_STORE_PRE_LOAD_SETTING,
@@ -205,6 +204,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
205204
IndexSettings.INDEX_MAPPER_SOURCE_MODE_SETTING,
206205
IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING,
207206
InferenceMetadataFieldsMapper.USE_LEGACY_SEMANTIC_TEXT_FORMAT,
207+
IndexSettings.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING,
208208

209209
// validate that built-in similarities don't get redefined
210210
Setting.groupSetting("index.similarity.", (s) -> {

server/src/main/java/org/elasticsearch/index/IndexSettings.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,14 @@ private static String getIgnoreAboveDefaultValue(final Settings settings) {
856856
Property.ServerlessPublic
857857
);
858858

859+
public static final Setting<Integer> INDEX_MAPPING_META_LENGTH_LIMIT_SETTING = Setting.intSetting(
860+
"index.mapping.meta.length_limit",
861+
500,
862+
0,
863+
Property.Dynamic,
864+
Property.IndexScope
865+
);
866+
859867
private final Index index;
860868
private final IndexVersion version;
861869
private final Logger logger;

server/src/main/java/org/elasticsearch/index/mapper/MapperService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,6 @@ public boolean isAutoUpdate() {
175175
Property.IndexScope,
176176
Property.IndexSettingDeprecatedInV7AndRemovedInV8
177177
);
178-
public static final Setting<Integer> INDEX_MAPPING_META_LENGTH_LIMIT_SETTING = Setting.intSetting(
179-
"index.mapping.meta.length_limit",
180-
500,
181-
0,
182-
Property.Dynamic,
183-
Property.IndexScope
184-
);
185178

186179
private final IndexAnalyzers indexAnalyzers;
187180
private final MappingParser mappingParser;

server/src/main/java/org/elasticsearch/index/mapper/TypeParsers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import static org.elasticsearch.common.xcontent.support.XContentMapValues.isArray;
2626
import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeStringValue;
27-
import static org.elasticsearch.index.mapper.MapperService.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING;
27+
import static org.elasticsearch.index.IndexSettings.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING;
2828

2929
public class TypeParsers {
3030
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(TypeParsers.class);

server/src/test/java/org/elasticsearch/index/mapper/TypeParsersTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
import java.util.stream.Collectors;
3636
import java.util.stream.IntStream;
3737

38+
import static org.elasticsearch.index.IndexSettings.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING;
3839
import static org.elasticsearch.index.analysis.AnalysisRegistry.DEFAULT_ANALYZER_NAME;
3940
import static org.elasticsearch.index.analysis.AnalysisRegistry.DEFAULT_SEARCH_ANALYZER_NAME;
4041
import static org.elasticsearch.index.analysis.AnalysisRegistry.DEFAULT_SEARCH_QUOTED_ANALYZER_NAME;
41-
import static org.elasticsearch.index.mapper.MapperService.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING;
4242
import static org.hamcrest.core.IsEqual.equalTo;
4343
import static org.mockito.Mockito.mock;
4444
import static org.mockito.Mockito.when;

0 commit comments

Comments
 (0)