Skip to content

Commit

Permalink
Fixing error in java client documentation for creating indexes (#5354) (
Browse files Browse the repository at this point in the history
#5404)

(cherry picked from commit bd14c32)

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent bec1ff5 commit 181b8bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _clients/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down

0 comments on commit 181b8bd

Please sign in to comment.