Interface ReactiveElasticsearchClient

All Known Implementing Classes:
DefaultReactiveElasticsearchClient

public interface ReactiveElasticsearchClient
A reactive client to connect to Elasticsearch.
Since:
3.2
Author:
Christoph Strobl, Mark Paluch, Peter-Josef Meisch, Henrique Amaral, Thomas Geese, Farid Faoudi, Sijia Liu
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Encapsulation of methods for accessing the Cluster API.
    static interface 
    Encapsulation of methods for accessing the Indices API.
    static interface 
    Low level callback interface operating upon WebClient to send commands towards elasticsearch.
    static interface 
    Cumulative client ElasticsearchHost information.
  • Method Summary

    Modifier and Type
    Method
    Description
    default reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation>
    aggregate(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
    Execute the given SearchRequest with aggregations against the search API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation>
    aggregate(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest with aggregations against the search API.
    reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation>
    aggregate(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest with aggregations against the search API.
    default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>
    bulk(Consumer<org.elasticsearch.action.bulk.BulkRequest> consumer)
    Execute a BulkRequest against the bulk API.
    default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>
    bulk(org.elasticsearch.action.bulk.BulkRequest bulkRequest)
    Execute a BulkRequest against the bulk API.
    reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>
    bulk(HttpHeaders headers, org.elasticsearch.action.bulk.BulkRequest bulkRequest)
    Execute a BulkRequest against the bulk API.
    Gain Access to cluster related commands.
    default reactor.core.publisher.Mono<Long>
    count(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
    Execute a SearchRequest against the count API.
    default reactor.core.publisher.Mono<Long>
    count(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute a SearchRequest against the search API.
    reactor.core.publisher.Mono<Long>
    count(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute a SearchRequest against the search API.
    default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse>
    delete(Consumer<org.elasticsearch.action.delete.DeleteRequest> consumer)
    Execute a DeleteRequest against the delete API to remove a document.
    default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse>
    delete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
    Execute the given DeleteRequest against the delete API to remove a document.
    reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse>
    delete(HttpHeaders headers, org.elasticsearch.action.delete.DeleteRequest deleteRequest)
    Execute the given DeleteRequest against the delete API to remove a document.
    default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    deleteBy(Consumer<org.elasticsearch.index.reindex.DeleteByQueryRequest> consumer)
    Execute a DeleteByQueryRequest against the delete by query API.
    default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    deleteBy(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest)
    Execute a DeleteByQueryRequest against the delete by query API.
    reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    deleteBy(HttpHeaders headers, org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest)
    Execute a DeleteByQueryRequest against the delete by query API.
    <T> reactor.core.publisher.Mono<T>
    Compose the actual command/s to run against Elasticsearch using the underlying connection.
    default reactor.core.publisher.Mono<Boolean>
    exists(Consumer<org.elasticsearch.action.get.GetRequest> consumer)
    Checks for the existence of a document.
    default reactor.core.publisher.Mono<Boolean>
    exists(org.elasticsearch.action.get.GetRequest getRequest)
    Checks for the existence of a document.
    reactor.core.publisher.Mono<Boolean>
    exists(HttpHeaders headers, org.elasticsearch.action.get.GetRequest getRequest)
    Checks for the existence of a document.
    default reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult>
    get(Consumer<org.elasticsearch.action.get.GetRequest> consumer)
    Execute a GetRequest against the get API to retrieve a document by id.
    default reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult>
    get(org.elasticsearch.action.get.GetRequest getRequest)
    Execute the given GetRequest against the get API to retrieve a document by id.
    reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult>
    get(HttpHeaders headers, org.elasticsearch.action.get.GetRequest getRequest)
    Execute the given GetRequest against the get API to retrieve a document by id.
    default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse>
    index(Consumer<org.elasticsearch.action.index.IndexRequest> consumer)
    Execute an IndexRequest against the index API to index a document.
    default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse>
    index(org.elasticsearch.action.index.IndexRequest indexRequest)
    Execute the given IndexRequest against the index API to index a document.
    reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse>
    index(HttpHeaders headers, org.elasticsearch.action.index.IndexRequest indexRequest)
    Execute the given IndexRequest against the index API to index a document.
    Gain access to index related commands.
    default reactor.core.publisher.Mono<org.elasticsearch.action.main.MainResponse>
    Get the cluster info otherwise provided when sending an HTTP request to port 9200.
    reactor.core.publisher.Mono<org.elasticsearch.action.main.MainResponse>
    info(HttpHeaders headers)
    Get the cluster info otherwise provided when sending an HTTP request to port 9200.
    default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse>
    multiGet(Consumer<org.elasticsearch.action.get.MultiGetRequest> consumer)
    Execute a MultiGetRequest against the multi-get API to retrieve multiple documents by id.
    default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse>
    multiGet(org.elasticsearch.action.get.MultiGetRequest multiGetRequest)
    Execute the given MultiGetRequest against the multi-get API to retrieve multiple documents by id.
    reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse>
    multiGet(HttpHeaders headers, org.elasticsearch.action.get.MultiGetRequest multiGetRequest)
    Execute the given MultiGetRequest against the multi-get API to retrieve multiple documents by id.
    default reactor.core.publisher.Mono<Boolean>
    Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.
    reactor.core.publisher.Mono<Boolean>
    ping(HttpHeaders headers)
    Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.
    default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    reindex(Consumer<org.elasticsearch.index.reindex.ReindexRequest> consumer)
    Execute the given ReindexRequest against the reindex API.
    default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    reindex(org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
    Execute the given ReindexRequest against the reindex API.
    reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>
    reindex(HttpHeaders headers, org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
    Execute the given ReindexRequest against the reindex API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    scroll(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search scroll API.
    reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    scroll(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search scroll API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    search(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
    Execute a SearchRequest against the search API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    search(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API.
    reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    search(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API.
    default reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse>
    searchForResponse(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API returning the whole response in one Mono.
    reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse>
    searchForResponse(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API returning the whole response in one Mono.
    default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    searchTemplate(Consumer<org.elasticsearch.script.mustache.SearchTemplateRequest> consumer)
    Executes a SearchTemplateRequest against the search template API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    searchTemplate(org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest)
    Executes a SearchTemplateRequest against the search template API.
    reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>
    searchTemplate(HttpHeaders headers, org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest)
    Executes a SearchTemplateRequest against the search template API.
    reactor.core.publisher.Mono<ReactiveElasticsearchClient.Status>
    Get the current client ReactiveElasticsearchClient.Status.
    default reactor.core.publisher.Mono<String>
    submitReindex(Consumer<org.elasticsearch.index.reindex.ReindexRequest> consumer)
    Execute the given ReindexRequest against the reindex API.
    default reactor.core.publisher.Mono<String>
    submitReindex(org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
    Execute the given ReindexRequest against the reindex API.
    reactor.core.publisher.Mono<String>
    submitReindex(HttpHeaders headers, org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
    Execute the given ReindexRequest against the reindex API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>
    suggest(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
    Execute the given SearchRequest against the search API.
    default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>
    suggest(org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API.
    reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>
    suggest(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
    Execute the given SearchRequest against the search API.
    default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse>
    update(Consumer<org.elasticsearch.action.update.UpdateRequest> consumer)
    Execute an UpdateRequest against the update API to alter a document.
    default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse>
    update(org.elasticsearch.action.update.UpdateRequest updateRequest)
    Execute the given UpdateRequest against the update API to alter a document.
    reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse>
    update(HttpHeaders headers, org.elasticsearch.action.update.UpdateRequest updateRequest)
    Execute the given UpdateRequest against the update API to alter a document.
    default reactor.core.publisher.Mono<ByQueryResponse>
    updateBy(Consumer<org.elasticsearch.index.reindex.UpdateByQueryRequest> consumer)
    Execute a UpdateByQueryRequest against the update by query API.
    default reactor.core.publisher.Mono<ByQueryResponse>
    updateBy(org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest)
    Execute a UpdateByQueryRequest against the update by query API.
    reactor.core.publisher.Mono<ByQueryResponse>
    updateBy(HttpHeaders headers, org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest)
    Execute a UpdateByQueryRequest against the update by query API.
  • Method Details

    • ping

      default reactor.core.publisher.Mono<Boolean> ping()
      Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.
      Returns:
      the Mono emitting the result of the ping attempt.
    • ping

      reactor.core.publisher.Mono<Boolean> ping(HttpHeaders headers)
      Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      Returns:
      the Mono emitting the result of the ping attempt.
    • info

      default reactor.core.publisher.Mono<org.elasticsearch.action.main.MainResponse> info()
      Get the cluster info otherwise provided when sending an HTTP request to port 9200.
      Returns:
      the Mono emitting the result of the info request.
    • info

      reactor.core.publisher.Mono<org.elasticsearch.action.main.MainResponse> info(HttpHeaders headers)
      Get the cluster info otherwise provided when sending an HTTP request to port 9200.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      Returns:
      the Mono emitting the result of the info request.
    • get

      default reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> get(Consumer<org.elasticsearch.action.get.GetRequest> consumer)
      Execute a GetRequest against the get API to retrieve a document by id.
      Parameters:
      consumer - never null.
      Returns:
      the Mono emitting the result.
      See Also:
    • get

      default reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> get(org.elasticsearch.action.get.GetRequest getRequest)
      Execute the given GetRequest against the get API to retrieve a document by id.
      Parameters:
      getRequest - must not be null.
      Returns:
      the Mono emitting the result.
      See Also:
    • get

      reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> get(HttpHeaders headers, org.elasticsearch.action.get.GetRequest getRequest)
      Execute the given GetRequest against the get API to retrieve a document by id.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      getRequest - must not be null.
      Returns:
      the Mono emitting the result.
      See Also:
    • multiGet

      default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(Consumer<org.elasticsearch.action.get.MultiGetRequest> consumer)
      Execute a MultiGetRequest against the multi-get API to retrieve multiple documents by id.
      Parameters:
      consumer - never null.
      Returns:
      the Flux emitting the result.
      See Also:
    • multiGet

      default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(org.elasticsearch.action.get.MultiGetRequest multiGetRequest)
      Execute the given MultiGetRequest against the multi-get API to retrieve multiple documents by id.
      Parameters:
      multiGetRequest - must not be null.
      Returns:
      the Flux emitting the result.
      See Also:
    • multiGet

      reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(HttpHeaders headers, org.elasticsearch.action.get.MultiGetRequest multiGetRequest)
      Execute the given MultiGetRequest against the multi-get API to retrieve multiple documents by id.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      multiGetRequest - must not be null.
      Returns:
      the Flux emitting the result.
      See Also:
    • exists

      default reactor.core.publisher.Mono<Boolean> exists(Consumer<org.elasticsearch.action.get.GetRequest> consumer)
      Checks for the existence of a document. Emits true if it exists, false otherwise.
      Parameters:
      consumer - never null.
      Returns:
      the Mono emitting true if it exists, false otherwise.
    • exists

      default reactor.core.publisher.Mono<Boolean> exists(org.elasticsearch.action.get.GetRequest getRequest)
      Checks for the existence of a document. Emits true if it exists, false otherwise.
      Parameters:
      getRequest - must not be null.
      Returns:
      the Mono emitting true if it exists, false otherwise.
    • exists

      reactor.core.publisher.Mono<Boolean> exists(HttpHeaders headers, org.elasticsearch.action.get.GetRequest getRequest)
      Checks for the existence of a document. Emits true if it exists, false otherwise.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      getRequest - must not be null.
      Returns:
      the Mono emitting true if it exists, false otherwise.
    • index

      default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> index(Consumer<org.elasticsearch.action.index.IndexRequest> consumer)
      Execute an IndexRequest against the index API to index a document.
      Parameters:
      consumer - never null.
      Returns:
      the Mono emitting the IndexResponse.
      See Also:
    • index

      default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> index(org.elasticsearch.action.index.IndexRequest indexRequest)
      Execute the given IndexRequest against the index API to index a document.
      Parameters:
      indexRequest - must not be null.
      Returns:
      the Mono emitting the IndexResponse.
      See Also:
    • index

      reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> index(HttpHeaders headers, org.elasticsearch.action.index.IndexRequest indexRequest)
      Execute the given IndexRequest against the index API to index a document.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      indexRequest - must not be null.
      Returns:
      the Mono emitting the IndexResponse.
      See Also:
    • indices

      Gain access to index related commands.
      Returns:
      access to index related commands.
    • cluster

      Gain Access to cluster related commands.
      Returns:
      Cluster implementations
      Since:
      4.2
    • update

      default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse> update(Consumer<org.elasticsearch.action.update.UpdateRequest> consumer)
      Execute an UpdateRequest against the update API to alter a document.
      Parameters:
      consumer - never null.
      Returns:
      the Mono emitting the UpdateResponse.
      See Also:
    • update

      default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse> update(org.elasticsearch.action.update.UpdateRequest updateRequest)
      Execute the given UpdateRequest against the update API to alter a document.
      Parameters:
      updateRequest - must not be null.
      Returns:
      the Mono emitting the UpdateResponse.
      See Also:
    • update

      reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse> update(HttpHeaders headers, org.elasticsearch.action.update.UpdateRequest updateRequest)
      Execute the given UpdateRequest against the update API to alter a document.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      updateRequest - must not be null.
      Returns:
      the Mono emitting the UpdateResponse.
      See Also:
    • delete

      default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(Consumer<org.elasticsearch.action.delete.DeleteRequest> consumer)
      Execute a DeleteRequest against the delete API to remove a document.
      Parameters:
      consumer - never null.
      Returns:
      the Mono emitting the DeleteResponse.
      See Also:
    • delete

      default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(org.elasticsearch.action.delete.DeleteRequest deleteRequest)
      Execute the given DeleteRequest against the delete API to remove a document.
      Parameters:
      deleteRequest - must not be null.
      Returns:
      the Mono emitting the DeleteResponse.
      See Also:
    • delete

      reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(HttpHeaders headers, org.elasticsearch.action.delete.DeleteRequest deleteRequest)
      Execute the given DeleteRequest against the delete API to remove a document.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      deleteRequest - must not be null.
      Returns:
      the Mono emitting the DeleteResponse.
      See Also:
    • count

      default reactor.core.publisher.Mono<Long> count(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
      Execute a SearchRequest against the count API.
      Parameters:
      consumer - new null.
      Returns:
      the Mono emitting the count result.
      Since:
      4.0
      See Also:
    • count

      default reactor.core.publisher.Mono<Long> count(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute a SearchRequest against the search API.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Mono emitting the count result.
      Since:
      4.0
      See Also:
    • count

      reactor.core.publisher.Mono<Long> count(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute a SearchRequest against the search API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Mono emitting the count result.
      Since:
      4.0
      See Also:
    • searchTemplate

      default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> searchTemplate(Consumer<org.elasticsearch.script.mustache.SearchTemplateRequest> consumer)
      Executes a SearchTemplateRequest against the search template API.
      Parameters:
      consumer - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • searchTemplate

      default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> searchTemplate(org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest)
      Executes a SearchTemplateRequest against the search template API.
      Parameters:
      searchTemplateRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • searchTemplate

      reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> searchTemplate(HttpHeaders headers, org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest)
      Executes a SearchTemplateRequest against the search template API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchTemplateRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • search

      default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
      Execute a SearchRequest against the search API.
      Parameters:
      consumer - never null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • search

      default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • search

      reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • searchForResponse

      default reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse> searchForResponse(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API returning the whole response in one Mono.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Mono emitting the whole SearchResponse.
      Since:
      4.1
      See Also:
    • searchForResponse

      reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse> searchForResponse(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API returning the whole response in one Mono.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Mono emitting the whole SearchResponse.
      Since:
      4.1
      See Also:
    • suggest

      default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> suggest(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
      Execute the given SearchRequest against the search API.
      Parameters:
      consumer - never null.
      Returns:
      the Flux emitting suggestions one by one.
      Since:
      4.1
    • suggest

      default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> suggest(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Flux emitting suggestions one by one.
      Since:
      4.1
    • suggest

      reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> suggest(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Flux emitting suggestions one by one.
      Since:
      4.1
    • aggregate

      default reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> aggregate(Consumer<org.elasticsearch.action.search.SearchRequest> consumer)
      Execute the given SearchRequest with aggregations against the search API.
      Parameters:
      consumer - never null.
      Returns:
      the Flux emitting Aggregation one by one.
      Since:
      4.0
      See Also:
    • aggregate

      default reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> aggregate(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest with aggregations against the search API.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Flux emitting Aggregation one by one.
      Since:
      4.0
      See Also:
    • aggregate

      reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> aggregate(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest with aggregations against the search API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Flux emitting Aggregation one by one.
      Since:
      4.0
      See Also:
    • scroll

      default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> scroll(org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search scroll API.
      Parameters:
      searchRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • scroll

      reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> scroll(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest)
      Execute the given SearchRequest against the search scroll API.
      Scroll keeps track of scrollIds returned by the server and provides them when requesting more results via _search/scroll. All bound server resources are freed on completion.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      searchRequest - must not be null.
      Returns:
      the Flux emitting hits one by one.
      See Also:
    • deleteBy

      default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> deleteBy(Consumer<org.elasticsearch.index.reindex.DeleteByQueryRequest> consumer)
      Execute a DeleteByQueryRequest against the delete by query API.
      Parameters:
      consumer - never null.
      Returns:
      a Mono emitting the emitting operation response.
      See Also:
    • deleteBy

      default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> deleteBy(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest)
      Execute a DeleteByQueryRequest against the delete by query API.
      Parameters:
      deleteRequest - must not be null.
      Returns:
      a Mono emitting the emitting operation response.
      See Also:
    • deleteBy

      reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> deleteBy(HttpHeaders headers, org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest)
      Execute a DeleteByQueryRequest against the delete by query API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      deleteRequest - must not be null.
      Returns:
      a Mono emitting operation response.
      See Also:
    • updateBy

      default reactor.core.publisher.Mono<ByQueryResponse> updateBy(Consumer<org.elasticsearch.index.reindex.UpdateByQueryRequest> consumer)
      Execute a UpdateByQueryRequest against the update by query API.
      Parameters:
      consumer - must not be null.
      Returns:
      a Mono emitting operation response.
      See Also:
    • updateBy

      default reactor.core.publisher.Mono<ByQueryResponse> updateBy(org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest)
      Execute a UpdateByQueryRequest against the update by query API.
      Parameters:
      updateRequest - must not be null.
      Returns:
      a Mono emitting operation response.
      See Also:
    • updateBy

      reactor.core.publisher.Mono<ByQueryResponse> updateBy(HttpHeaders headers, org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest)
      Execute a UpdateByQueryRequest against the update by query API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      updateRequest - must not be null.
      Returns:
      a Mono emitting operation response.
      See Also:
    • bulk

      default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> bulk(Consumer<org.elasticsearch.action.bulk.BulkRequest> consumer)
      Execute a BulkRequest against the bulk API.
      Parameters:
      consumer - never null.
      Returns:
      a Mono emitting the emitting operation response.
      See Also:
    • bulk

      default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> bulk(org.elasticsearch.action.bulk.BulkRequest bulkRequest)
      Execute a BulkRequest against the bulk API.
      Parameters:
      bulkRequest - must not be null.
      Returns:
      a Mono emitting the emitting operation response.
      See Also:
    • bulk

      reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> bulk(HttpHeaders headers, org.elasticsearch.action.bulk.BulkRequest bulkRequest)
      Execute a BulkRequest against the bulk API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      bulkRequest - must not be null.
      Returns:
      a Mono emitting operation response.
      See Also:
    • reindex

      default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> reindex(Consumer<org.elasticsearch.index.reindex.ReindexRequest> consumer)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      consumer - must not be null
      Returns:
      the Mono emitting the response
      Since:
      4.4
    • reindex

      default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> reindex(org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      reindexRequest - must not be null
      Returns:
      the Mono emitting the response
      Since:
      4.4
    • reindex

      reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> reindex(HttpHeaders headers, org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      reindexRequest - must not be null
      Returns:
      the Mono emitting the response
      Since:
      4.4
    • submitReindex

      default reactor.core.publisher.Mono<String> submitReindex(Consumer<org.elasticsearch.index.reindex.ReindexRequest> consumer)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      consumer - must not be null
      Returns:
      the Mono emitting the task id
      Since:
      4.4
    • submitReindex

      default reactor.core.publisher.Mono<String> submitReindex(org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      reindexRequest - must not be null
      Returns:
      the Mono emitting the task id
      Since:
      4.4
    • submitReindex

      reactor.core.publisher.Mono<String> submitReindex(HttpHeaders headers, org.elasticsearch.index.reindex.ReindexRequest reindexRequest)
      Execute the given ReindexRequest against the reindex API.
      Parameters:
      headers - Use HttpHeaders to provide eg. authentication data. Must not be null.
      reindexRequest - must not be null
      Returns:
      the Mono emitting the task id
      Since:
      4.4
    • execute

      <T> reactor.core.publisher.Mono<T> execute(ReactiveElasticsearchClient.ReactiveElasticsearchClientCallback<T> callback)
      Compose the actual command/s to run against Elasticsearch using the underlying connection. Execute selects an active server from the available ones and retries operations that fail with a ConnectException on another node if the previously selected one becomes unavailable.
      Type Parameters:
      T - the type emitted by the returned Mono.
      Parameters:
      callback - the callback wielding the actual command to run.
      Returns:
      the Mono emitting the ClientResponse once subscribed.
    • status

      reactor.core.publisher.Mono<ReactiveElasticsearchClient.Status> status()
      Get the current client ReactiveElasticsearchClient.Status.
      NOTE the actual implementation might choose to actively check the current cluster state by pinging known nodes.
      Returns:
      the actual ReactiveElasticsearchClient.Status information.