Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/reference/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/getting-started-java.html
navigation_title: Getting started
---

# Getting started
# Getting started with the {{es}} Java client

This page guides you through the installation process of the Java client, shows you how to instantiate the client, and how to perform basic Elasticsearch operations with it.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_basic_authentication.html
navigation_title: Basic authentication
---

# Basic authentication [_basic_authentication]
# Basic authentication setup for the {{es}} Java REST client [_basic_authentication]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_encrypted_communication.html
navigation_title: Encrypted communication
---

# Encrypted communication [_encrypted_communication]
# Encrypted communication and TLS setup in the {{es}} Java REST client [_encrypted_communication]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/config/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-config.html
navigation_title: Common configuration
---

# Common configuration [java-rest-low-config]
# {{es}} Java REST client configuration [java-rest-low-config]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/config/node_selector.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_node_selector.html
navigation_title: Node selector
---

# Node selector [_node_selector]
# Configuring node selectors in the {{es}} Java REST client [_node_selector]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_number_of_threads.html
navigation_title: Number of threads
---

# Number of threads [_number_of_threads]
# Setting number of threads in the {{es}} Java REST client [_number_of_threads]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_other_authentication_methods.html
navigation_title: Other authentication methods
---

# Other authentication methods [_other_authentication_methods]
# Other authentication methods in the {{es}} Java REST client [_other_authentication_methods]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/config/others.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_others.html
navigation_title: More config options
---

# Others [_others]
# Other configuration options in the {{es}} Java REST client [_others]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/config/timeouts.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_timeouts.html
navigation_title: Timeouts
---

# Timeouts [_timeouts]
# Configuring timeouts in the {{es}} Java REST client [_timeouts]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/sniffer/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/sniffer.html
navigation_title: Sniffer
---

# Sniffer [sniffer]
# Sniffer in the {{es}} Java REST client[sniffer]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/sniffer/javadoc.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-sniffer-javadoc.html
navigation_title: Javadoc
---

# Javadoc [java-rest-sniffer-javadoc]
# Javadoc for the {{es}} Java REST client sniffer [java-rest-sniffer-javadoc]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_maven_repository.html
navigation_title: Maven Repository
---

# Maven Repository [_maven_repository]
# Maven repository for {{es}} Java REST client sniffer [_maven_repository]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/sniffer/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/_usage.html
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest-client/sniffer/usage.html
navigation_title: Usage
---

# Usage [_usage]
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage.html
navigation_title: Getting started
---

# Getting started [java-rest-low-usage]
# Getting started with the {{es}} Java REST client [java-rest-low-usage]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/initialization.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-initialization.html
navigation_title: Initialization
---

# Initialization [java-rest-low-usage-initialization]
# Initializing the {{es}} Java REST client [java-rest-low-usage-initialization]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/javadoc.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-javadoc.html
navigation_title: Javadoc
---

# Javadoc [java-rest-low-javadoc]
# Javadoc for the {{es}} Java REST client [java-rest-low-javadoc]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/logging.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-logging.html
navigation_title: Logging
---

# Logging [java-rest-low-usage-logging]
# Logging in the {{es}} Java REST client [java-rest-low-usage-logging]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/maven.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-maven.html
navigation_title: Maven repository
---

# Maven Repository [java-rest-low-usage-maven]
# Maven repository for {{es}} Java REST client [java-rest-low-usage-maven]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/requests.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-requests.html
navigation_title: Performing requests
---

# Performing requests [java-rest-low-usage-requests]
# Performing requests with the {{es}} Java REST client [java-rest-low-usage-requests]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/transport/rest-client/usage/responses.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low-usage-responses.html
navigation_title: Reading responses
---

# Reading responses [java-rest-low-usage-responses]
# Reading responses with the {{es}} Java REST client [java-rest-low-usage-responses]

:::{include} /reference/_snippets/legacy-rest-client.md
:::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/basic_authentication.html
navigation_title: Basic authentication
---

# Basic authentication
# Basic authentication setup for {{es}} Java REST 5 client

To use basic authentication in the REST 5 client, set a default authorization header:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/encrypted_communication.html
navigation_title: Encrypted communication
---

# Encrypted communication
# Encrypted communication and TLS setup in the {{es}} Java REST 5 client

Encrypted communication using TLS can also be configured through the `HttpClientConfigCallback`. The [`org.apache.http.impl.nio.client.HttpAsyncClientBuilder`](https://hc.apache.org/httpcomponents-asyncclient-4.1.x/current/httpasyncclient/apidocs/org/apache/http/impl/nio/client/HttpAsyncClientBuilder.html) received as an argument exposes multiple methods to configure encrypted communication: `setSSLContext`, `setSSLSessionStrategy` and `setConnectionManager`, in order of precedence from the least important.

Expand Down
7 changes: 6 additions & 1 deletion docs/reference/transport/rest5-client/config/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config.html
navigation_title: Common configuration
---

# Common configuration
# {{es}} Java REST 5 client configuration

As explained in [Initialization](../usage/initialization.md), the `RestClientBuilder` supports providing both a `RequestConfigCallback` and an `HttpClientConfigCallback` which allow for any customization that the Apache Async Http Client exposes. Those callbacks make it possible to modify some specific behaviour of the client without overriding every other default configuration that the `Rest5Client` is initialized with. This section describes some common scenarios that require additional configuration for the low-level Java REST Client.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/node_selector.html
navigation_title: Node selector
---

# Node selector
# Configuring node selectors in the {{es}} Java REST 5 client

The client sends each request to one of the configured nodes in round-robin fashion. Nodes can optionally be filtered through a node selector that needs to be provided when initializing the client. This is useful when sniffing is enabled, in case no dedicated master nodes should be hit by HTTP requests. For each request the client will run the eventually configured node selector to filter the node candidates, then select the next one in the list out of the remaining ones.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/number_of_threads.html
navigation_title: Number of threads
---

# Number of threads
# Setting number of threads in the {{es}} Java REST 5 client

The Apache Http Async Client starts by default one dispatcher thread, and a number of worker threads used by the connection manager, as many as the number of locally detected processors (depending on what `Runtime.getRuntime().availableProcessors()` returns). The number of threads can be modified as follows:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/other_authentication_methods.html
navigation_title: Other authentication methods
---

# Other authentication methods
# Other authentication methods in the {{es}} Java REST 5 client

## Elasticsearch Token Service tokens

Expand Down
7 changes: 6 additions & 1 deletion docs/reference/transport/rest5-client/config/others.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/others.html
navigation_title: More config options
---

# Others
# Other configuration options in the {{es}} Java REST 5 client

For any other required configuration needed, the Apache HttpAsyncClient docs should be consulted: [https://hc.apache.org/httpcomponents-asyncclient-4.1.x/](https://hc.apache.org/httpcomponents-asyncclient-4.1.x/) .

Expand Down
8 changes: 7 additions & 1 deletion docs/reference/transport/rest5-client/config/timeouts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Timeouts
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/config/timeouts.html
navigation_title: Timeouts
---

# Configuring timeouts in the {{es}} Java REST 5 client

You can set timeouts when building the `Rest5Client`:

Expand Down
8 changes: 6 additions & 2 deletions docs/reference/transport/rest5-client/sniffer/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@

# Sniffer
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/sniffer.html
navigation_title: Sniffer
---
# Sniffer in the {{es}} Java REST 5 client

Minimal library that allows to automatically discover nodes from a running Elasticsearch cluster and set them to an existing `RestClient` instance. It retrieves by default the nodes that belong to the cluster using the Nodes Info api and uses jackson to parse the obtained json response.

Expand Down
7 changes: 6 additions & 1 deletion docs/reference/transport/rest5-client/usage/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/usage.html
navigation_title: Getting started
---

# Getting started
# Getting started with the {{es}} Java Rest 5 client

This section describes how to get started with the low-level REST client from getting the artifact to using it in an application.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/usage/initialization.html
navigation_title: Initialization
---

# Initialization
# Initializing the {{es}} Java REST 5 client

A `Rest5Client` instance can be built through the corresponding `Rest5ClientBuilder` class, created via `Rest5Client#builder(...)` static method. The only required argument is one or more URLs or `HttpHost` that the client will communicate with as follows:

Expand Down
8 changes: 7 additions & 1 deletion docs/reference/transport/rest5-client/usage/logging.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Logging
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/usage/logging.html
navigation_title: Logging
---

# Logging in the {{es}} Java REST 5 client

The Java REST 5 client uses the same logging library that the Apache Async Http Client uses: [Apache Commons Logging](https://commons.apache.org/proper/commons-logging/), which comes with support for a number of popular logging implementations. The java packages to enable logging for is `co.elastic.clients.transport.rest5_client`.

Expand Down
7 changes: 6 additions & 1 deletion docs/reference/transport/rest5-client/usage/requests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
mapped_pages:
- https://www.elastic.co/docs/reference/elasticsearch/clients/java/transport/rest5-client/usage/requests.html
navigation_title: Performing requests
---

# Performing requests
# Performing requests with the {{es}} Java REST 5 client

Once the `RestClient` has been created, requests can be sent by calling either `performRequest` or `performRequestAsync`. `performRequest` is synchronous and will block the calling thread and return the `Response` when the request is successful or throw an exception if it fails. `performRequestAsync` is asynchronous and accepts a `ResponseListener` argument that it calls with a `Response` when the request is successful or with an `Exception` if it fails.

Expand Down
Loading
Loading