Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Dec 19, 2024
1 parent aff65ec commit 9631133
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ private Mode resolveSourceMode() {
}

if (sourceModeIsNoop) {
return indexMode.defaultSourceMode();
if (indexMode == null || indexMode == IndexMode.STANDARD) {
return null;
} else {
return indexMode.defaultSourceMode();
}
}

// If `_source.mode` is not set we need to apply a default according to index mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public void testNewIndexHasSyntheticSourceUsage() throws IOException {
}
""";
boolean result = provider.newIndexHasSyntheticSourceUsage(indexName, null, settings, List.of(new CompressedXContent(mapping)));
assertTrue(result);
assertFalse("_source.mode is a noop", result);
assertThat(newMapperServiceCounter.get(), equalTo(1));
assertWarnings(SourceFieldMapper.DEPRECATION_WARNING);
}
Expand Down

0 comments on commit 9631133

Please sign in to comment.