count() throws IOException, OpenSearchException {
- return this.transport.performRequestAsync(new CountRequest.Builder().build(), CountRequest._ENDPOINT,
- this.transportOptions);
- }
-
- // ----- Endpoint: create
-
- /**
- * Creates a new document in the index.
- *
- * Returns a 409 response when a document with a same ID already exists in the
- * index.
- *
- *
- */
-
- public CompletableFuture create(CreateRequest request)
- throws IOException, OpenSearchException {
- @SuppressWarnings("unchecked")
- JsonEndpoint, CreateResponse, ErrorResponse> endpoint =
- (JsonEndpoint