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
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
  • Loading branch information
BigSamu authored Oct 26, 2023
1 parent f51f7a6 commit bd14c32
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 bd14c32

Please sign in to comment.