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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceEncapsulation of methods for accessing the Cluster API.static interfaceEncapsulation of methods for accessing the Indices API.static interfaceLow level callback interface operating uponWebClientto send commands towards elasticsearch.static interfaceCumulative clientElasticsearchHostinformation. -
Method Summary
Modifier and TypeMethodDescriptiondefault reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation>Execute the givenSearchRequestwith aggregations against the search API.default reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation>aggregate(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestwith 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 givenSearchRequestwith aggregations against the search API.default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>Execute aBulkRequestagainst the bulk API.default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>bulk(org.elasticsearch.action.bulk.BulkRequest bulkRequest) Execute aBulkRequestagainst the bulk API.reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse>bulk(HttpHeaders headers, org.elasticsearch.action.bulk.BulkRequest bulkRequest) Execute aBulkRequestagainst the bulk API.cluster()Gain Access to cluster related commands.default reactor.core.publisher.Mono<Long>Execute aSearchRequestagainst the count API.default reactor.core.publisher.Mono<Long>count(org.elasticsearch.action.search.SearchRequest searchRequest) Execute aSearchRequestagainst the search API.reactor.core.publisher.Mono<Long>count(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute aSearchRequestagainst the search API.default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse>Execute aDeleteRequestagainst 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 givenDeleteRequestagainst 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 givenDeleteRequestagainst the delete API to remove a document.default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>Execute aDeleteByQueryRequestagainst the delete by query API.default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>deleteBy(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest) Execute aDeleteByQueryRequestagainst the delete by query API.reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse>deleteBy(HttpHeaders headers, org.elasticsearch.index.reindex.DeleteByQueryRequest deleteRequest) Execute aDeleteByQueryRequestagainst the delete by query API.<T> reactor.core.publisher.Mono<T>Compose the actual command/s to run against Elasticsearch using the underlyingconnection.default reactor.core.publisher.Mono<Boolean>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>Execute aGetRequestagainst 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 givenGetRequestagainst 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 givenGetRequestagainst the get API to retrieve a document by id.default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse>Execute anIndexRequestagainst 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 givenIndexRequestagainst 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 givenIndexRequestagainst the index API to index a document.indices()Gain access to index related commands.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.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>Execute aMultiGetRequestagainst 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 givenMultiGetRequestagainst 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 givenMultiGetRequestagainst the multi-get API to retrieve multiple documents by id.default reactor.core.publisher.Mono<Boolean>ping()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.Flux<org.elasticsearch.search.SearchHit>scroll(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search scroll API.reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>scroll(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search scroll API.default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>Execute aSearchRequestagainst the search API.default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>search(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>search(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.default reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse>searchForResponse(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst 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 givenSearchRequestagainst 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 aSearchTemplateRequestagainst the search template API.default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>searchTemplate(org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest) Executes aSearchTemplateRequestagainst the search template API.reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit>searchTemplate(HttpHeaders headers, org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest) Executes aSearchTemplateRequestagainst the search template API.reactor.core.publisher.Mono<ReactiveElasticsearchClient.Status>status()Get the current clientReactiveElasticsearchClient.Status.default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>Execute the givenSearchRequestagainst the search API.default reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>suggest(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest>suggest(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse>Execute anUpdateRequestagainst 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 givenUpdateRequestagainst 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 givenUpdateRequestagainst the update API to alter a document.default reactor.core.publisher.Mono<ByQueryResponse>Execute aUpdateByQueryRequestagainst the update by query API.default reactor.core.publisher.Mono<ByQueryResponse>updateBy(org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest) Execute aUpdateByQueryRequestagainst the update by query API.reactor.core.publisher.Mono<ByQueryResponse>updateBy(HttpHeaders headers, org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest) Execute aUpdateByQueryRequestagainst the update by query API.
-
Method Details
-
ping
Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.- Returns:
- the
Monoemitting the result of the ping attempt.
-
ping
Pings the remote Elasticsearch cluster and emits true if the ping succeeded, false otherwise.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.- Returns:
- the
Monoemitting 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
Monoemitting the result of the info request.
-
info
Get the cluster info otherwise provided when sending an HTTP request to port 9200.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.- Returns:
- the
Monoemitting 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 aGetRequestagainst the get API to retrieve a document by id.- Parameters:
consumer- never null.- Returns:
- the
Monoemitting theresult. - See Also:
-
get
default reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> get(org.elasticsearch.action.get.GetRequest getRequest) Execute the givenGetRequestagainst the get API to retrieve a document by id.- Parameters:
getRequest- must not be null.- Returns:
- the
Monoemitting theresult. - See Also:
-
get
reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> get(HttpHeaders headers, org.elasticsearch.action.get.GetRequest getRequest) Execute the givenGetRequestagainst the get API to retrieve a document by id.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.getRequest- must not be null.- Returns:
- the
Monoemitting theresult. - See Also:
-
multiGet
default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(Consumer<org.elasticsearch.action.get.MultiGetRequest> consumer) Execute aMultiGetRequestagainst the multi-get API to retrieve multiple documents by id.- Parameters:
consumer- never null.- Returns:
- the
Fluxemitting theresult. - See Also:
-
multiGet
default reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(org.elasticsearch.action.get.MultiGetRequest multiGetRequest) Execute the givenMultiGetRequestagainst the multi-get API to retrieve multiple documents by id.- Parameters:
multiGetRequest- must not be null.- Returns:
- the
Fluxemitting theresult. - See Also:
-
multiGet
reactor.core.publisher.Flux<org.elasticsearch.action.get.MultiGetItemResponse> multiGet(HttpHeaders headers, org.elasticsearch.action.get.MultiGetRequest multiGetRequest) Execute the givenMultiGetRequestagainst the multi-get API to retrieve multiple documents by id.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.multiGetRequest- must not be null.- Returns:
- the
Fluxemitting theresult. - 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
Monoemitting 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
Monoemitting 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- UseHttpHeadersto provide eg. authentication data. Must not be null.getRequest- must not be null.- Returns:
- the
Monoemitting 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 anIndexRequestagainst the index API to index a document.- Parameters:
consumer- never null.- Returns:
- the
Monoemitting theIndexResponse. - See Also:
-
index
default reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> index(org.elasticsearch.action.index.IndexRequest indexRequest) Execute the givenIndexRequestagainst the index API to index a document.- Parameters:
indexRequest- must not be null.- Returns:
- the
Monoemitting theIndexResponse. - See Also:
-
index
reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> index(HttpHeaders headers, org.elasticsearch.action.index.IndexRequest indexRequest) Execute the givenIndexRequestagainst the index API to index a document.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.indexRequest- must not be null.- Returns:
- the
Monoemitting theIndexResponse. - See Also:
-
indices
ReactiveElasticsearchClient.Indices indices()Gain access to index related commands.- Returns:
- access to index related commands.
-
cluster
ReactiveElasticsearchClient.Cluster 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 anUpdateRequestagainst the update API to alter a document.- Parameters:
consumer- never null.- Returns:
- the
Monoemitting theUpdateResponse. - See Also:
-
update
default reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse> update(org.elasticsearch.action.update.UpdateRequest updateRequest) Execute the givenUpdateRequestagainst the update API to alter a document.- Parameters:
updateRequest- must not be null.- Returns:
- the
Monoemitting theUpdateResponse. - See Also:
-
update
reactor.core.publisher.Mono<org.elasticsearch.action.update.UpdateResponse> update(HttpHeaders headers, org.elasticsearch.action.update.UpdateRequest updateRequest) Execute the givenUpdateRequestagainst the update API to alter a document.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.updateRequest- must not be null.- Returns:
- the
Monoemitting theUpdateResponse. - See Also:
-
delete
default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(Consumer<org.elasticsearch.action.delete.DeleteRequest> consumer) Execute aDeleteRequestagainst the delete API to remove a document.- Parameters:
consumer- never null.- Returns:
- the
Monoemitting theDeleteResponse. - See Also:
-
delete
default reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(org.elasticsearch.action.delete.DeleteRequest deleteRequest) Execute the givenDeleteRequestagainst the delete API to remove a document.- Parameters:
deleteRequest- must not be null.- Returns:
- the
Monoemitting theDeleteResponse. - See Also:
-
delete
reactor.core.publisher.Mono<org.elasticsearch.action.delete.DeleteResponse> delete(HttpHeaders headers, org.elasticsearch.action.delete.DeleteRequest deleteRequest) Execute the givenDeleteRequestagainst the delete API to remove a document.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.deleteRequest- must not be null.- Returns:
- the
Monoemitting theDeleteResponse. - See Also:
-
count
default reactor.core.publisher.Mono<Long> count(Consumer<org.elasticsearch.action.search.SearchRequest> consumer) Execute aSearchRequestagainst the count API.- Parameters:
consumer- new null.- Returns:
- the
Monoemitting the count result. - Since:
- 4.0
- See Also:
-
count
default reactor.core.publisher.Mono<Long> count(org.elasticsearch.action.search.SearchRequest searchRequest) Execute aSearchRequestagainst the search API.- Parameters:
searchRequest- must not be null.- Returns:
- the
Monoemitting the count result. - Since:
- 4.0
- See Also:
-
count
reactor.core.publisher.Mono<Long> count(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute aSearchRequestagainst the search API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
Monoemitting 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 aSearchTemplateRequestagainst the search template API.- Parameters:
consumer- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
searchTemplate
default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> searchTemplate(org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest) Executes aSearchTemplateRequestagainst the search template API.- Parameters:
searchTemplateRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
searchTemplate
reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> searchTemplate(HttpHeaders headers, org.elasticsearch.script.mustache.SearchTemplateRequest searchTemplateRequest) Executes aSearchTemplateRequestagainst the search template API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchTemplateRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
search
default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(Consumer<org.elasticsearch.action.search.SearchRequest> consumer) Execute aSearchRequestagainst the search API.- Parameters:
consumer- never null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
search
default reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.- Parameters:
searchRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
search
reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> search(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
searchForResponse
default reactor.core.publisher.Mono<org.elasticsearch.action.search.SearchResponse> searchForResponse(org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search API returning the whole response in one Mono.- Parameters:
searchRequest- must not be null.- Returns:
- the
Monoemitting the wholeSearchResponse. - 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 givenSearchRequestagainst the search API returning the whole response in one Mono.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
Monoemitting the wholeSearchResponse. - 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 givenSearchRequestagainst the search API.- Parameters:
consumer- never null.- Returns:
- the
Fluxemittingsuggestionsone 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 givenSearchRequestagainst the search API.- Parameters:
searchRequest- must not be null.- Returns:
- the
Fluxemittingsuggestionsone 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 givenSearchRequestagainst the search API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
Fluxemittingsuggestionsone 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 givenSearchRequestwith aggregations against the search API.- Parameters:
consumer- never null.- Returns:
- the
FluxemittingAggregationone 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 givenSearchRequestwith aggregations against the search API.- Parameters:
searchRequest- must not be null.- Returns:
- the
FluxemittingAggregationone 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 givenSearchRequestwith aggregations against the search API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
FluxemittingAggregationone 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 givenSearchRequestagainst the search scroll API.- Parameters:
searchRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
scroll
reactor.core.publisher.Flux<org.elasticsearch.search.SearchHit> scroll(HttpHeaders headers, org.elasticsearch.action.search.SearchRequest searchRequest) Execute the givenSearchRequestagainst the search scroll API.
Scroll keeps track ofscrollIdsreturned by the server and provides them when requesting more results via_search/scroll. All bound server resources are freed on completion.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.searchRequest- must not be null.- Returns:
- the
Fluxemittinghitsone by one. - See Also:
-
deleteBy
default reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> deleteBy(Consumer<org.elasticsearch.index.reindex.DeleteByQueryRequest> consumer) Execute aDeleteByQueryRequestagainst the delete by query API.- Parameters:
consumer- never null.- Returns:
- a
Monoemitting 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 aDeleteByQueryRequestagainst the delete by query API.- Parameters:
deleteRequest- must not be null.- Returns:
- a
Monoemitting 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 aDeleteByQueryRequestagainst the delete by query API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.deleteRequest- must not be null.- Returns:
- a
Monoemitting operation response. - See Also:
-
updateBy
default reactor.core.publisher.Mono<ByQueryResponse> updateBy(Consumer<org.elasticsearch.index.reindex.UpdateByQueryRequest> consumer) Execute aUpdateByQueryRequestagainst the update by query API.- Parameters:
consumer- must not be null.- Returns:
- a
Monoemitting operation response. - See Also:
-
updateBy
default reactor.core.publisher.Mono<ByQueryResponse> updateBy(org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest) Execute aUpdateByQueryRequestagainst the update by query API.- Parameters:
updateRequest- must not be null.- Returns:
- a
Monoemitting operation response. - See Also:
-
updateBy
reactor.core.publisher.Mono<ByQueryResponse> updateBy(HttpHeaders headers, org.elasticsearch.index.reindex.UpdateByQueryRequest updateRequest) Execute aUpdateByQueryRequestagainst the update by query API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.updateRequest- must not be null.- Returns:
- a
Monoemitting operation response. - See Also:
-
bulk
default reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> bulk(Consumer<org.elasticsearch.action.bulk.BulkRequest> consumer) Execute aBulkRequestagainst the bulk API.- Parameters:
consumer- never null.- Returns:
- a
Monoemitting 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 aBulkRequestagainst the bulk API.- Parameters:
bulkRequest- must not be null.- Returns:
- a
Monoemitting 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 aBulkRequestagainst the bulk API.- Parameters:
headers- UseHttpHeadersto provide eg. authentication data. Must not be null.bulkRequest- must not be null.- Returns:
- a
Monoemitting operation response. - See Also:
-
execute
<T> reactor.core.publisher.Mono<T> execute(ReactiveElasticsearchClient.ReactiveElasticsearchClientCallback<T> callback) Compose the actual command/s to run against Elasticsearch using the underlyingconnection.Executeselects an active server from the available ones and retries operations that fail with aConnectExceptionon another node if the previously selected one becomes unavailable.- Type Parameters:
T- the type emitted by the returned Mono.- Parameters:
callback- thecallbackwielding the actual command to run.- Returns:
- the
Monoemitting theClientResponseonce subscribed.
-
status
reactor.core.publisher.Mono<ReactiveElasticsearchClient.Status> status()Get the current clientReactiveElasticsearchClient.Status.
NOTE the actual implementation might choose to actively check the current cluster state by pinging known nodes.- Returns:
- the actual
ReactiveElasticsearchClient.Statusinformation.
-