Skip to content

Commit f7ff485

Browse files
committed
Add comment to IndexSortConfig
1 parent 72926e0 commit f7ff485

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ public static FieldSortSpec[] getDefaultSortSpecs(Settings settings) {
131131
return new FieldSortSpec[0];
132132
}
133133

134+
// Can't use IndexSettings.MODE.get(settings) here because the validation logic for IndexSettings.MODE uses the default value
135+
// of index.sort.*, which causes infinite recursion (since we're already in the default value provider for those settings).
136+
// So we need to get the mode while bypassing the validation.
134137
String indexMode = settings.get(IndexSettings.MODE.getKey());
135138
if (indexMode != null) {
136139
indexMode = indexMode.toLowerCase(Locale.ROOT);

0 commit comments

Comments
 (0)