Class ElasticsearchClients

java.lang.Object
org.springframework.data.elasticsearch.client.elc.ElasticsearchClients

public final class ElasticsearchClients extends Object
Utility class to create the different Elasticsearch clients
Since:
4.4
Author:
Peter-Josef Meisch
  • Constructor Details

    • ElasticsearchClients

      public ElasticsearchClients()
  • Method Details

    • createReactive

      public static ReactiveElasticsearchClient createReactive(ClientConfiguration clientConfiguration)
      Parameters:
      clientConfiguration - configuration options, must not be null.
      Returns:
      the ReactiveElasticsearchClient
    • createReactive

      public static ReactiveElasticsearchClient createReactive(ClientConfiguration clientConfiguration, @Nullable co.elastic.clients.transport.TransportOptions transportOptions)
      Parameters:
      clientConfiguration - configuration options, must not be null.
      transportOptions - options to be added to each request.
      Returns:
      the ReactiveElasticsearchClient
    • createReactive

      public static ReactiveElasticsearchClient createReactive(org.elasticsearch.client.RestClient restClient)
      Parameters:
      restClient - the underlying RestClient
      Returns:
      the ReactiveElasticsearchClient
    • createReactive

      public static ReactiveElasticsearchClient createReactive(org.elasticsearch.client.RestClient restClient, @Nullable co.elastic.clients.transport.TransportOptions transportOptions)
      Parameters:
      restClient - the underlying RestClient
      transportOptions - options to be added to each request.
      Returns:
      the ReactiveElasticsearchClient
    • createImperative

      public static co.elastic.clients.elasticsearch.ElasticsearchClient createImperative(ClientConfiguration clientConfiguration)
      Creates a new imperative ElasticsearchClient
      Parameters:
      clientConfiguration - configuration options, must not be null.
      Returns:
      the ElasticsearchClient
    • createImperative

      public static co.elastic.clients.elasticsearch.ElasticsearchClient createImperative(ClientConfiguration clientConfiguration, co.elastic.clients.transport.TransportOptions transportOptions)
      Creates a new imperative ElasticsearchClient
      Parameters:
      clientConfiguration - configuration options, must not be null.
      transportOptions - options to be added to each request.
      Returns:
      the ElasticsearchClient
    • createImperative

      public static co.elastic.clients.elasticsearch.ElasticsearchClient createImperative(org.elasticsearch.client.RestClient restClient)
      Creates a new imperative ElasticsearchClient
      Parameters:
      restClient - the RestClient to use
      Returns:
      the ElasticsearchClient
    • createImperative

      public static co.elastic.clients.elasticsearch.ElasticsearchClient createImperative(org.elasticsearch.client.RestClient restClient, @Nullable co.elastic.clients.transport.TransportOptions transportOptions)
      Creates a new imperative ElasticsearchClient
      Parameters:
      restClient - the RestClient to use
      transportOptions - options to be added to each request.
      Returns:
      the ElasticsearchClient
    • getRestClient

      public static org.elasticsearch.client.RestClient getRestClient(ClientConfiguration clientConfiguration)
      Creates a low level RestClient for the given configuration.
      Parameters:
      clientConfiguration - must not be null
      Returns:
      the RestClient