You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Clientedit
You can use the Java client in multiple ways:
Obtaining an elasticsearch Client
is simple. The most common way to
get a client is by:
-
Creating an embedded
Node
that acts as a node within a cluster. -
Requesting a
Client
from your embeddedNode
.
Another manner is by creating a TransportClient
that connects to a cluster.
Important:
Please note that you are encouraged to use the same version on client and cluster sides. You may hit some incompatibility issues when mixing major versions.