File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 2727import org .elasticsearch .index .IndexMode ;
2828import org .elasticsearch .index .IndexSettings ;
2929import org .elasticsearch .index .IndexVersion ;
30+ import org .elasticsearch .index .IndexVersions ;
3031import org .elasticsearch .index .analysis .AnalysisRegistry ;
3132import org .elasticsearch .index .analysis .IndexAnalyzers ;
3233import org .elasticsearch .index .analysis .NamedAnalyzer ;
@@ -129,7 +130,12 @@ public boolean isAutoUpdate() {
129130 );
130131 public static final Setting <Boolean > INDEX_MAPPING_IGNORE_DYNAMIC_BEYOND_LIMIT_SETTING = Setting .boolSetting (
131132 "index.mapping.total_fields.ignore_dynamic_beyond_limit" ,
132- settings -> String .valueOf (IndexSettings .MODE .get (settings ) == IndexMode .LOGSDB ),
133+ settings -> {
134+ boolean isLogsDBIndexMode = IndexSettings .MODE .get (settings ) == IndexMode .LOGSDB ;
135+ boolean isNewIndexVersion = IndexMetadata .SETTING_INDEX_VERSION_CREATED .get (settings )
136+ .onOrAfter (IndexVersions .LOGSDB_DEFAULT_IGNORE_DYNAMIC_BEYOND_LIMIT );
137+ return String .valueOf (isLogsDBIndexMode && isNewIndexVersion );
138+ },
133139 Property .Dynamic ,
134140 Property .IndexScope ,
135141 Property .ServerlessPublic
You can’t perform that action at this time.
0 commit comments