Client

edit

You can use the Java client in multiple ways:

  • Perform standard index, get, delete and search operations on an existing cluster
  • Perform administrative tasks on a running cluster
  • Start full nodes when you want to run Elasticsearch embedded in your own application or when you want to launch unit or integration tests

Obtaining an elasticsearch Client is simple. The most common way to get a client is by:

  1. Creating an embedded Node that acts as a node within a cluster.
  2. Requesting a Client from your embedded Node.

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.