Interface ESClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
ESRestClient, ESTransportClient

public interface ESClient extends AutoCloseable
Since:
9.3
  • Method Details

    • waitForYellowStatus

      boolean waitForYellowStatus(String[] indexNames, int timeoutSecond)
    • getHealthStatus

      org.opensearch.cluster.health.ClusterHealthStatus getHealthStatus(String[] indexNames)
    • refresh

      void refresh(String indexName)
    • flush

      void flush(String indexName)
    • optimize

      void optimize(String indexName)
    • indexExists

      boolean indexExists(String indexName)
    • mappingExists

      boolean mappingExists(String indexName, String type)
    • deleteIndex

      void deleteIndex(String indexName, int timeoutSecond)
    • createIndex

      void createIndex(String indexName, String jsonSettings)
    • createMapping

      void createMapping(String indexName, String type, String jsonMapping)
    • getMapping

      String getMapping(String indexName)
      Returns the mapping from elastic, exposed for testing purposes
      Since:
      2021.17
    • getNodesInfo

      String getNodesInfo()
    • getNodesStats

      String getNodesStats()
    • aliasExists

      boolean aliasExists(String aliasName)
    • getFirstIndexForAlias

      String getFirstIndexForAlias(String aliasName)
      Returns the name of the index referenced by the alias. Returns null if the alias does not exists.
    • updateAlias

      void updateAlias(String aliasName, String indexName)
    • bulk

      org.opensearch.action.bulk.BulkResponse bulk(org.opensearch.action.bulk.BulkRequest request)
    • delete

      org.opensearch.action.delete.DeleteResponse delete(org.opensearch.action.delete.DeleteRequest request)
    • search

      org.opensearch.action.search.SearchResponse search(org.opensearch.action.search.SearchRequest request)
    • searchScroll

      org.opensearch.action.search.SearchResponse searchScroll(org.opensearch.action.search.SearchScrollRequest request)
    • get

      org.opensearch.action.get.GetResponse get(org.opensearch.action.get.GetRequest request)
    • index

      org.opensearch.action.index.IndexResponse index(org.opensearch.action.index.IndexRequest request)
      Performs the indexing request.
      Throws:
      ConcurrentUpdateException - if a more recent version of the document exits.
    • clearScroll

      org.opensearch.action.search.ClearScrollResponse clearScroll(org.opensearch.action.search.ClearScrollRequest request)
    • bulkProcessorBuilder

      org.opensearch.action.bulk.BulkProcessor.Builder bulkProcessorBuilder(org.opensearch.action.bulk.BulkProcessor.Listener listener)
      Creates an elasticsearch BulkProcessor builder.
      Since:
      10.3