Fixing error in java client documentation for creating indexes (#5354)
Signed-off-by: Samuel Valdes Gutierrez <valdesgutierrez@gmail.com>
This commit is contained in:
parent
f51f7a6524
commit
bd14c328b6
|
@ -295,9 +295,8 @@ CreateIndexRequest createIndexRequest = new CreateIndexRequest.Builder().index(i
|
||||||
client.indices().create(createIndexRequest);
|
client.indices().create(createIndexRequest);
|
||||||
|
|
||||||
IndexSettings indexSettings = new IndexSettings.Builder().autoExpandReplicas("0-all").build();
|
IndexSettings indexSettings = new IndexSettings.Builder().autoExpandReplicas("0-all").build();
|
||||||
IndexSettingsBody settingsBody = new IndexSettingsBody.Builder().settings(indexSettings).build();
|
PutIndicesSettingsRequest putIndicesSettingsRequest = new PutIndicesSettingsRequest.Builder().index(index).value(indexSettings).build();
|
||||||
PutSettingsRequest putSettingsRequest = new PutSettingsRequest.Builder().index(index).value(settingsBody).build();
|
client.indices().putSettings(PutIndicesSettingsRequest);
|
||||||
client.indices().putSettings(putSettingsRequest);
|
|
||||||
```
|
```
|
||||||
{% include copy.html %}
|
{% include copy.html %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue