From bd14c328b6323803787fab446357454264e69eb0 Mon Sep 17 00:00:00 2001 From: Samuel Valdes Gutierrez Date: Thu, 26 Oct 2023 20:17:00 +0100 Subject: [PATCH] Fixing error in java client documentation for creating indexes (#5354) Signed-off-by: Samuel Valdes Gutierrez --- _clients/java.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_clients/java.md b/_clients/java.md index 2b8c776d23..c9cf7c0a63 100644 --- a/_clients/java.md +++ b/_clients/java.md @@ -295,9 +295,8 @@ CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(i client.indices().create(createIndexRequest); IndexSettings indexSettings = new IndexSettings.Builder().autoExpandReplicas("0-all").build(); -IndexSettingsBody settingsBody = new IndexSettingsBody.Builder().settings(indexSettings).build(); -PutSettingsRequest putSettingsRequest = new PutSettingsRequest.Builder().index(index).value(settingsBody).build(); -client.indices().putSettings(putSettingsRequest); +PutIndicesSettingsRequest putIndicesSettingsRequest = new PutIndicesSettingsRequest.Builder().index(index).value(indexSettings).build(); +client.indices().putSettings(PutIndicesSettingsRequest); ``` {% include copy.html %}