Skip to content

Commit

Permalink
make custom result index no hidden index
Browse files Browse the repository at this point in the history
Signed-off-by: Jackie Han <[email protected]>
  • Loading branch information
jackiehanyang committed Jun 11, 2024
1 parent 46890e5 commit d03ed70
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,11 @@ private RolloverRequest buildRolloverRequest(String resultIndexAlias, String rol
CreateIndexRequest createRequest = rollOverRequest.getCreateIndexRequest();

createRequest.index(rolloverIndexPattern).mapping(resultMapping, XContentType.JSON);
choosePrimaryShards(createRequest, true);

if (resultIndexAlias.startsWith(customResultIndexPrefix)) {
choosePrimaryShards(createRequest, false);
} else {
choosePrimaryShards(createRequest, true);
}
return rollOverRequest;
}

Expand Down

0 comments on commit d03ed70

Please sign in to comment.