High Level Rest - Rollover Shard Count Issue

When specifiing both the shard and replica count, the shard count gets stepped on and defaults to 5. In the debugger, under settings there is only the single entry. Snippet below:

// specify alias, and new rollover index name
RolloverRequest request = new RolloverRequest(codeList, codeList-000002);
request.addMaxIndexAgeCondition(new TimeValue(1, TimeUnit.SECONDS));
request.getCreateIndexRequest().mapping(className, jsonStr, XContentType.JSON);
request.getCreateIndexRequest().settings(Settings.builder().put("index.number_of_shards", 1));
request.getCreateIndexRequest().settings(Settings.builder().put("index.number_of_replicas", 0));
RolloverResponse rolloverResponse = client.indices().rollover(request, RequestOptions.DEFAULT);

// all following status vars come back as expected
boolean acknowledged = rolloverResponse.isAcknowledged();
boolean shardsAcked = rolloverResponse.isShardsAcknowledged();
String oldIndex = rolloverResponse.getOldIndex();
String newIndex = rolloverResponse.getNewIndex();
boolean isRolledOver = rolloverResponse.isRolledOver();
boolean isDryRun = rolloverResponse.isDryRun();

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.