Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cbuescher committed Jan 20, 2025
1 parent c02292f commit 67ca839
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private void beforeRestart(

XContentBuilder settingsBuilder = XContentFactory.jsonBuilder().startObject().startObject("settings");
settingsBuilder.field("index.number_of_shards", numberOfShards);
settingsBuilder.field("index.mapper.dynamic", true);

// 6.5.0 started using soft-deletes, but it was only enabled by default on 7.0
if (oldVersion.onOrAfter(Version.fromString("6.5.0")) && oldVersion.before(Version.fromString("7.0.0")) && randomBoolean()) {
Expand All @@ -156,6 +157,12 @@ private void beforeRestart(
settingsBuilder.endObject().endObject();

createIndex.setJsonEntity(Strings.toString(settingsBuilder));
createIndex.setOptions(
expectWarnings(
"[index.mapper.dynamic] setting was deprecated in Elasticsearch and will be removed in a future release! "
+ "See the breaking changes documentation for the next major version."
)
);
assertOK(oldEs.performRequest(createIndex));

for (int i = 0; i < numDocs + extraDocs; i++) {
Expand Down

0 comments on commit 67ca839

Please sign in to comment.