Performing requests using the REST client

The main goal of the high-level REST client is to expose each API specific methods. Hence, it tries to provide a method for each API. Some of the methods can be called directly from the REST client. Other methods can be called indirectly from the method of the REST client. In the following tables, we only cover those APIs we are interested in and that are within the scope of this book.

We first list the high-level REST client's request methods in the following table:

API

Direct call from REST client

Request and response

Document

index(), indexAsync()

IndexResponse, IndexResponse

get(), getAsync()

GetRequest, GetResponse

delete(), deleteAsync()

DeleteRequest, DeleteResponse ...

Get Advanced Elasticsearch 7.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.