File tree Expand file tree Collapse file tree 5 files changed +12
-11
lines changed
main/java/org/elasticsearch
test/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 5 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
175175 MapperService .INDEX_MAPPING_DIMENSION_FIELDS_LIMIT_SETTING ,
176176 MapperService .INDEX_MAPPING_FIELD_NAME_LENGTH_LIMIT_SETTING ,
177177 MapperService .INDEX_MAPPER_DYNAMIC_SETTING ,
178+ MapperService .INDEX_MAPPING_META_LENGTH_LIMIT_SETTING ,
178179 BitsetFilterCache .INDEX_LOAD_RANDOM_ACCESS_FILTERS_EAGERLY_SETTING ,
179180 IndexModule .INDEX_STORE_TYPE_SETTING ,
180181 IndexModule .INDEX_STORE_PRE_LOAD_SETTING ,
@@ -206,7 +207,7 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
206207 IndexSettings .INDEX_MAPPER_SOURCE_MODE_SETTING ,
207208 IndexSettings .RECOVERY_USE_SYNTHETIC_SOURCE_SETTING ,
208209 InferenceMetadataFieldsMapper .USE_LEGACY_SEMANTIC_TEXT_FORMAT ,
209- IndexSettings .INDEX_MAPPING_META_LENGTH_LIMIT_SETTING ,
210+ // IndexSettings.INDEX_MAPPING_META_LENGTH_LIMIT_SETTING,
210211
211212 // validate that built-in similarities don't get redefined
212213 Setting .groupSetting ("index.similarity." , (s ) -> {
Original file line number Diff line number Diff line change @@ -856,14 +856,6 @@ private static String getIgnoreAboveDefaultValue(final Settings settings) {
856856 Property .Final
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 .IndexScope ,
864- Property .Final
865- );
866-
867859 private final Index index ;
868860 private final IndexVersion version ;
869861 private final Logger logger ;
Original file line number Diff line number Diff line change @@ -175,6 +175,13 @@ 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 .IndexScope ,
183+ Property .Final
184+ );
178185
179186 private final IndexAnalyzers indexAnalyzers ;
180187 private final MappingParser mappingParser ;
Original file line number Diff line number Diff line change 2424
2525import static org .elasticsearch .common .xcontent .support .XContentMapValues .isArray ;
2626import static org .elasticsearch .common .xcontent .support .XContentMapValues .nodeStringValue ;
27- import static org .elasticsearch .index .IndexSettings .INDEX_MAPPING_META_LENGTH_LIMIT_SETTING ;
27+ import static org .elasticsearch .index .mapper . MapperService .INDEX_MAPPING_META_LENGTH_LIMIT_SETTING ;
2828
2929public class TypeParsers {
3030 private static final DeprecationLogger deprecationLogger = DeprecationLogger .getLogger (TypeParsers .class );
Original file line number Diff line number Diff line change 3838import static org .elasticsearch .index .analysis .AnalysisRegistry .DEFAULT_ANALYZER_NAME ;
3939import static org .elasticsearch .index .analysis .AnalysisRegistry .DEFAULT_SEARCH_ANALYZER_NAME ;
4040import 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 ;
4142import static org .hamcrest .core .IsEqual .equalTo ;
4243import static org .mockito .Mockito .mock ;
4344import static org .mockito .Mockito .when ;
@@ -199,7 +200,7 @@ public void testParseMeta() {
199200 .put (IndexMetadata .SETTING_VERSION_CREATED , IndexVersion .current ())
200201 .put (IndexMetadata .SETTING_NUMBER_OF_REPLICAS , 1 )
201202 .put (IndexMetadata .SETTING_NUMBER_OF_SHARDS , 1 )
202- .put (IndexSettings . INDEX_MAPPING_META_LENGTH_LIMIT_SETTING .getKey (), 300 )
203+ .put (INDEX_MAPPING_META_LENGTH_LIMIT_SETTING .getKey (), 300 )
203204 .build ();
204205 MappingParserContext otherParserContext = createParserContext (otherSettings );
205206 String longString = IntStream .range (0 , 301 ).mapToObj (Integer ::toString ).collect (Collectors .joining ());
You can’t perform that action at this time.
0 commit comments