From 1a1c3e23c40debfcafb55503e7d3f3f33f3d73c5 Mon Sep 17 00:00:00 2001 From: Nicholas Walter Knize Date: Thu, 24 Feb 2022 15:15:07 -0600 Subject: [PATCH] PR Feedback Signed-off-by: Nicholas Walter Knize --- server/src/main/java/org/opensearch/client/Requests.java | 2 ++ .../java/org/opensearch/action/delete/DeleteRequestTests.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/client/Requests.java b/server/src/main/java/org/opensearch/client/Requests.java index ac78373d11d6f..d89f55a37a9cf 100644 --- a/server/src/main/java/org/opensearch/client/Requests.java +++ b/server/src/main/java/org/opensearch/client/Requests.java @@ -98,6 +98,7 @@ public static IndexRequest indexRequest() { /** * Create an index request against a specific index. + * Note that setting {@link IndexRequest#id(String)} is optional. * * @param index The index name to index the request against * @return The index request @@ -109,6 +110,7 @@ public static IndexRequest indexRequest(String index) { /** * Creates a delete request against a specific index. + * Note that {@link DeleteRequest#id(String)} must be set. * * @param index The index name to delete from * @return The delete request diff --git a/server/src/test/java/org/opensearch/action/delete/DeleteRequestTests.java b/server/src/test/java/org/opensearch/action/delete/DeleteRequestTests.java index a202f5c8b1da0..0dda8969e7d74 100644 --- a/server/src/test/java/org/opensearch/action/delete/DeleteRequestTests.java +++ b/server/src/test/java/org/opensearch/action/delete/DeleteRequestTests.java @@ -49,7 +49,6 @@ public void testValidation() { } { - // Empty types are accepted but fail validation final DeleteRequest request = new DeleteRequest("index4", null); final ActionRequestValidationException validate = request.validate();