Skip to content

Commit

Permalink
fix test issue
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <[email protected]>
  • Loading branch information
lezzago committed Feb 21, 2023
1 parent 82f9ad9 commit ef8de0d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ protected String createTestIndex(String index, String mapping, Settings settings

protected String createTestIndex(RestClient client, String index, String mapping, Settings settings) throws IOException {
Request request = new Request("PUT", "/" + index);
String entity = "{\"settings\": " + Strings.toString(settings);
String entity = "{\"settings\": " + Strings.toString(
settings.toXContent(XContentFactory.jsonBuilder(), ToXContent.EMPTY_PARAMS));
if (mapping != null) {
entity = entity + ",\"mappings\" : {" + mapping + "}";
}
Expand Down

0 comments on commit ef8de0d

Please sign in to comment.