mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
parent
130fdef367
commit
a6e0f02220
@ -13,11 +13,11 @@ You can use the *Java client* in multiple ways:
|
|||||||
Obtaining an elasticsearch `Client` is simple. The most common way to
|
Obtaining an elasticsearch `Client` is simple. The most common way to
|
||||||
get a client is by:
|
get a client is by:
|
||||||
|
|
||||||
1. Creating an embedded link:#nodeclient[`Node`] that acts as a node
|
1. Creating an embedded <<node-client,`Node`>> that acts as a node
|
||||||
within a cluster.
|
within a cluster.
|
||||||
2. Requesting a `Client` from your embedded `Node`.
|
2. Requesting a `Client` from your embedded `Node`.
|
||||||
|
|
||||||
Another manner is by creating a link:#transport-client[`TransportClient`]
|
Another manner is by creating a <<transport-client,`TransportClient`>>
|
||||||
that connects to a cluster.
|
that connects to a cluster.
|
||||||
|
|
||||||
*Important:*
|
*Important:*
|
||||||
@ -154,8 +154,7 @@ Client client = new TransportClient(settings);
|
|||||||
//Add transport addresses and do something with the client...
|
//Add transport addresses and do something with the client...
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
Or using `elasticsearch.yml` file as shown in the link:#nodeclient[Node
|
Or using `elasticsearch.yml` file as shown in <<node-client>>
|
||||||
Client section]
|
|
||||||
|
|
||||||
The client allows to sniff the rest of the cluster, and add those into
|
The client allows to sniff the rest of the cluster, and add those into
|
||||||
its list of machines to use. In this case, note that the IP addresses
|
its list of machines to use. In this case, note that the IP addresses
|
||||||
|
Loading…
x
Reference in New Issue
Block a user