public class ReactiveElasticsearchTemplate extends Object implements ReactiveElasticsearchOperations, ApplicationContextAware
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ReactiveElasticsearchTemplate.DocumentCallback<T> |
protected class |
ReactiveElasticsearchTemplate.ReadDocumentCallback<T> |
protected class |
ReactiveElasticsearchTemplate.ReadSearchDocumentCallback<T> |
protected static interface |
ReactiveElasticsearchTemplate.SearchDocumentCallback<T> |
ReactiveElasticsearchOperations.ClientCallback<T extends org.reactivestreams.Publisher<?>>, ReactiveElasticsearchOperations.IndicesClientCallback<T extends org.reactivestreams.Publisher<?>>| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.data.elasticsearch.core.RequestFactory |
requestFactory |
| Constructor and Description |
|---|
ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client) |
ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client,
ElasticsearchConverter converter) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> |
aggregate(Query query,
Class<?> entityType)
Perform an aggregation specified by the given
query. |
reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> |
aggregate(Query query,
Class<?> entityType,
IndexCoordinates index)
Perform an aggregation specified by the given
query. |
reactor.core.publisher.Mono<Void> |
bulkUpdate(List<UpdateQuery> queries,
BulkOptions bulkOptions,
IndexCoordinates index)
Bulk update all objects.
|
protected reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> |
checkForBulkOperationFailure(org.elasticsearch.action.bulk.BulkResponse bulkResponse) |
reactor.core.publisher.Mono<Long> |
count(Query query,
Class<?> entityType)
Count the number of documents matching the given
Query. |
reactor.core.publisher.Mono<Long> |
count(Query query,
Class<?> entityType,
IndexCoordinates index)
Count the number of documents matching the given
Query. |
reactor.core.publisher.Mono<String> |
delete(Object entity)
Delete the given entity extracting index from entity metadata.
|
reactor.core.publisher.Mono<String> |
delete(Object entity,
IndexCoordinates index)
Delete the given entity extracting index from entity metadata.
|
reactor.core.publisher.Mono<Long> |
delete(Query query,
Class<?> entityType)
Delete the documents matching the given
Query extracting index from entity metadata. |
reactor.core.publisher.Mono<Long> |
delete(Query query,
Class<?> entityType,
IndexCoordinates index)
Delete the documents matching the given
Query extracting index from entity metadata. |
reactor.core.publisher.Mono<String> |
delete(String id,
Class<?> entityType)
Delete the entity with given id extracting index from entity metadata.
|
reactor.core.publisher.Mono<String> |
delete(String id,
IndexCoordinates index)
Delete the entity with given id.
|
protected reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> |
doAggregate(org.elasticsearch.action.search.SearchRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Flux<org.elasticsearch.action.bulk.BulkItemResponse> |
doBulkOperation(List<?> queries,
BulkOptions bulkOptions,
IndexCoordinates index) |
protected reactor.core.publisher.Mono<Long> |
doCount(org.elasticsearch.action.search.SearchRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Mono<String> |
doDelete(org.elasticsearch.action.delete.DeleteRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> |
doDeleteBy(org.elasticsearch.index.reindex.DeleteByQueryRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Mono<Boolean> |
doExists(org.elasticsearch.action.get.GetRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Flux<SearchDocument> |
doFind(org.elasticsearch.action.search.SearchRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Mono<SearchDocumentResponse> |
doFindForResponse(org.elasticsearch.action.search.SearchRequest request)
Customization hook on the actual execution result
Mono. |
protected reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> |
doGet(org.elasticsearch.action.get.GetRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> |
doIndex(org.elasticsearch.action.index.IndexRequest request)
Customization hook on the actual execution result
Publisher. |
protected reactor.core.publisher.Flux<SearchDocument> |
doScroll(org.elasticsearch.action.search.SearchRequest request)
Customization hook on the actual execution result
Publisher. |
<T> org.reactivestreams.Publisher<T> |
execute(ReactiveElasticsearchOperations.ClientCallback<org.reactivestreams.Publisher<T>> callback)
Execute within a
ReactiveElasticsearchOperations.ClientCallback managing resources and translating errors. |
<T> org.reactivestreams.Publisher<T> |
executeWithIndicesClient(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback)
Execute within a
ReactiveElasticsearchOperations.IndicesClientCallback managing resources and translating errors. |
reactor.core.publisher.Mono<Boolean> |
exists(String id,
Class<?> entityType)
Check if an entity with given id exists.
|
reactor.core.publisher.Mono<Boolean> |
exists(String id,
Class<?> entityType,
IndexCoordinates index)
Check if an entity with given id exists.
|
reactor.core.publisher.Mono<Boolean> |
exists(String id,
IndexCoordinates index)
Check if an entity with given id exists.
|
<T> reactor.core.publisher.Mono<T> |
get(String id,
Class<T> entityType)
Find the document with the given id mapped onto the given entityType.
|
<T> reactor.core.publisher.Mono<T> |
get(String id,
Class<T> entityType,
IndexCoordinates index)
Fetch the entity with given id.
|
protected ReactiveElasticsearchClient |
getClient()
Obtain the
ReactiveElasticsearchClient to operate upon. |
protected reactor.core.publisher.Mono<String> |
getClusterVersion() |
ElasticsearchConverter |
getElasticsearchConverter()
Get the
ElasticsearchConverter used. |
IndexCoordinates |
getIndexCoordinatesFor(Class<?> clazz) |
protected ReactiveElasticsearchClient.Indices |
getIndicesClient()
Obtain the
ReactiveElasticsearchClient.Indices to operate upon. |
ElasticsearchPersistentEntity<?> |
getPersistentEntityFor(Class<?> type) |
org.elasticsearch.action.support.WriteRequest.RefreshPolicy |
getRefreshPolicy() |
ReactiveIndexOperations |
indexOps(Class<?> clazz)
Creates a
ReactiveIndexOperations that is bound to the given class |
ReactiveIndexOperations |
indexOps(IndexCoordinates index)
Creates a
ReactiveIndexOperations that is bound to the given index |
protected <T> reactor.core.publisher.Mono<T> |
maybeCallAfterConvert(T entity,
Document document,
IndexCoordinates index) |
protected <T> reactor.core.publisher.Mono<T> |
maybeCallAfterSave(T entity,
IndexCoordinates index) |
protected <T> reactor.core.publisher.Mono<T> |
maybeCallBeforeConvert(T entity,
IndexCoordinates index) |
<T> reactor.core.publisher.Flux<T> |
multiGet(Query query,
Class<T> clazz)
Execute a multiGet against elasticsearch for the given ids.
|
<T> reactor.core.publisher.Flux<T> |
multiGet(Query query,
Class<T> clazz,
IndexCoordinates index)
Execute a multiGet against elasticsearch for the given ids.
|
protected org.elasticsearch.index.reindex.DeleteByQueryRequest |
prepareDeleteByRequest(org.elasticsearch.index.reindex.DeleteByQueryRequest request)
Customization hook to modify a generated
DeleteByQueryRequest prior to its execution. |
protected org.elasticsearch.action.delete.DeleteRequest |
prepareDeleteRequest(org.elasticsearch.action.delete.DeleteRequest request)
Customization hook to modify a generated
DeleteRequest prior to its execution. |
protected org.elasticsearch.action.index.IndexRequest |
prepareIndexRequest(Object source,
org.elasticsearch.action.index.IndexRequest request)
Customization hook to modify a generated
IndexRequest prior to its execution. |
protected org.elasticsearch.action.search.SearchRequest |
prepareSearchRequest(org.elasticsearch.action.search.SearchRequest request)
Customization hook to modify a generated
SearchRequest prior to its execution. |
protected <R extends org.elasticsearch.action.support.WriteRequest<R>> |
prepareWriteRequest(R request)
Pre process the write request before it is sent to the server, eg. by setting the
refresh policy if applicable. |
<T> reactor.core.publisher.Mono<T> |
save(T entity)
Index the given entity extracting index from entity metadata.
|
<T> reactor.core.publisher.Mono<T> |
save(T entity,
IndexCoordinates index)
Index the entity under the given type in the given index.
|
<T> reactor.core.publisher.Flux<T> |
saveAll(reactor.core.publisher.Mono<? extends Collection<? extends T>> entities,
Class<T> clazz)
Index entities in the index extracted from entity metadata.
|
<T> reactor.core.publisher.Flux<T> |
saveAll(reactor.core.publisher.Mono<? extends Collection<? extends T>> entitiesPublisher,
IndexCoordinates index)
Index entities in the given index.
|
<T> reactor.core.publisher.Flux<SearchHit<T>> |
search(Query query,
Class<?> entityType,
Class<T> returnType)
Search the index for entities matching the given
query. |
<T> reactor.core.publisher.Flux<SearchHit<T>> |
search(Query query,
Class<?> entityType,
Class<T> resultType,
IndexCoordinates index)
Search the index for entities matching the given
query. |
<T> reactor.core.publisher.Mono<SearchPage<T>> |
searchForPage(Query query,
Class<?> entityType,
Class<T> resultType)
Search the index for entities matching the given
query. |
<T> reactor.core.publisher.Mono<SearchPage<T>> |
searchForPage(Query query,
Class<?> entityType,
Class<T> resultType,
IndexCoordinates index)
Search the index for entities matching the given
query. |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setEntityCallbacks(ReactiveEntityCallbacks entityCallbacks)
Set the
ReactiveEntityCallbacks instance to use when invoking callbacks
like the ReactiveBeforeConvertCallback. |
void |
setIndicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions)
Set the default
IndicesOptions for search requests. |
void |
setRefreshPolicy(org.elasticsearch.action.support.WriteRequest.RefreshPolicy refreshPolicy)
Set the default
WriteRequest.RefreshPolicy to apply when writing to Elasticsearch. |
reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> |
suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
Class<?> entityType)
Does a suggest query
|
reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> |
suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
Does a suggest query
|
reactor.core.publisher.Mono<UpdateResponse> |
update(UpdateQuery updateQuery,
IndexCoordinates index)
Partial update of the document.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbulkUpdate, delete, findById, findById, save, save, saveAll, saveAllcount, find, find, find, find, search, search, searchForPage, searchForPageprotected org.springframework.data.elasticsearch.core.RequestFactory requestFactory
public ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client)
public ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client, ElasticsearchConverter converter)
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setRefreshPolicy(@Nullable org.elasticsearch.action.support.WriteRequest.RefreshPolicy refreshPolicy)
WriteRequest.RefreshPolicy to apply when writing to Elasticsearch.refreshPolicy - can be null.@Nullable public org.elasticsearch.action.support.WriteRequest.RefreshPolicy getRefreshPolicy()
WriteRequest.RefreshPolicy.public void setIndicesOptions(@Nullable org.elasticsearch.action.support.IndicesOptions indicesOptions)
IndicesOptions for search requests.indicesOptions - can be null.public void setEntityCallbacks(ReactiveEntityCallbacks entityCallbacks)
ReactiveEntityCallbacks instance to use when invoking callbacks
like the ReactiveBeforeConvertCallback.
Overrides potentially existing ReactiveEntityCallbacks.entityCallbacks - must not be null.IllegalArgumentException - if the given instance is null.public <T> reactor.core.publisher.Mono<T> save(T entity,
IndexCoordinates index)
ReactiveDocumentOperationssave in interface ReactiveDocumentOperationsentity - must not be null.index - the target index, must not be nullMono emitting the saved entity.public <T> reactor.core.publisher.Mono<T> save(T entity)
ReactiveDocumentOperationssave in interface ReactiveDocumentOperationsentity - must not be null.Mono emitting the saved entity.public <T> reactor.core.publisher.Flux<T> saveAll(reactor.core.publisher.Mono<? extends Collection<? extends T>> entities, Class<T> clazz)
ReactiveDocumentOperationssaveAll in interface ReactiveDocumentOperationsentities - must not be null.clazz - the entity class, used to determine the indexFlux emitting saved entities.public <T> reactor.core.publisher.Flux<T> saveAll(reactor.core.publisher.Mono<? extends Collection<? extends T>> entitiesPublisher, IndexCoordinates index)
ReactiveDocumentOperationssaveAll in interface ReactiveDocumentOperationsentitiesPublisher - must not be null.index - the target index, must not be nullFlux emitting saved entities.public <T> reactor.core.publisher.Flux<T> multiGet(Query query, Class<T> clazz)
ReactiveDocumentOperationsmultiGet in interface ReactiveDocumentOperationsquery - the query defining the ids of the objects to getclazz - the type of the object to be returned, used to determine the indexpublic <T> reactor.core.publisher.Flux<T> multiGet(Query query, Class<T> clazz, IndexCoordinates index)
ReactiveDocumentOperationsmultiGet in interface ReactiveDocumentOperationsquery - the query defining the ids of the objects to getclazz - the type of the object to be returnedindex - the index(es) from which the objects are read.public reactor.core.publisher.Mono<Void> bulkUpdate(List<UpdateQuery> queries, BulkOptions bulkOptions, IndexCoordinates index)
ReactiveDocumentOperationsbulkUpdate in interface ReactiveDocumentOperationsqueries - the queries to execute in bulkbulkOptions - options to be added to the bulk requestprotected reactor.core.publisher.Mono<org.elasticsearch.action.index.IndexResponse> doIndex(org.elasticsearch.action.index.IndexRequest request)
Publisher. request - the already prepared IndexRequest ready to be executed.Mono emitting the result of the operation.protected reactor.core.publisher.Flux<org.elasticsearch.action.bulk.BulkItemResponse> doBulkOperation(List<?> queries, BulkOptions bulkOptions, IndexCoordinates index)
protected reactor.core.publisher.Mono<org.elasticsearch.action.bulk.BulkResponse> checkForBulkOperationFailure(org.elasticsearch.action.bulk.BulkResponse bulkResponse)
public reactor.core.publisher.Mono<Boolean> exists(String id, Class<?> entityType)
ReactiveDocumentOperationsexists in interface ReactiveDocumentOperationsid - the _id of the document to look for.entityType - the domain type used.Mono emitting true if a matching document exists, false otherwise.public reactor.core.publisher.Mono<Boolean> exists(String id, IndexCoordinates index)
ReactiveDocumentOperationsexists in interface ReactiveDocumentOperationsid - the _id of the document to look for.index - the target index, must not be nullMono emitting true if a matching document exists, false otherwise.public reactor.core.publisher.Mono<Boolean> exists(String id, Class<?> entityType, IndexCoordinates index)
ReactiveDocumentOperationsexists in interface ReactiveDocumentOperationsid - the _id of the document to look for.index - the target index, must not be nullMono emitting true if a matching document exists, false otherwise.protected reactor.core.publisher.Mono<Boolean> doExists(org.elasticsearch.action.get.GetRequest request)
Publisher. request - the already prepared GetRequest ready to be executed.Mono emitting the result of the operation.public <T> reactor.core.publisher.Mono<T> get(String id, Class<T> entityType)
ReactiveDocumentOperationsget in interface ReactiveDocumentOperationsid - the _id of the document to fetch.entityType - the domain type used for mapping the document.Mono.empty() if not found.public <T> reactor.core.publisher.Mono<T> get(String id, Class<T> entityType, IndexCoordinates index)
ReactiveDocumentOperationsget in interface ReactiveDocumentOperationsid - must not be null.index - the target index, must not be nullMono emitting the entity or signalling completion if none found.protected reactor.core.publisher.Mono<org.elasticsearch.index.get.GetResult> doGet(org.elasticsearch.action.get.GetRequest request)
Publisher. request - the already prepared GetRequest ready to be executed.Mono emitting the result of the operation.public reactor.core.publisher.Mono<String> delete(Object entity, IndexCoordinates index)
ReactiveDocumentOperationsdelete in interface ReactiveDocumentOperationsentity - must not be null.index - the target index, must not be nullMono emitting the id of the removed document.public reactor.core.publisher.Mono<String> delete(Object entity)
ReactiveDocumentOperationsdelete in interface ReactiveDocumentOperationsentity - must not be null.Mono emitting the id of the removed document.public reactor.core.publisher.Mono<String> delete(String id, Class<?> entityType)
ReactiveDocumentOperationsdelete in interface ReactiveDocumentOperationsid - must not be null.entityType - must not be null.Mono emitting the id of the removed document.public reactor.core.publisher.Mono<String> delete(String id, IndexCoordinates index)
ReactiveDocumentOperationsdelete in interface ReactiveDocumentOperationsid - must not be null.index - the target index, must not be nullMono emitting the id of the removed document.public reactor.core.publisher.Mono<Long> delete(Query query, Class<?> entityType, IndexCoordinates index)
ReactiveDocumentOperationsQuery extracting index from entity metadata.delete in interface ReactiveDocumentOperationsquery - must not be null.entityType - must not be null.index - the target index, must not be nullMono emitting the number of the removed documents.public reactor.core.publisher.Mono<UpdateResponse> update(UpdateQuery updateQuery, IndexCoordinates index)
ReactiveDocumentOperationsupdate in interface ReactiveDocumentOperationsupdateQuery - query defining the updateindex - the index where to update the recordsMono emitting the update responsepublic reactor.core.publisher.Mono<Long> delete(Query query, Class<?> entityType)
ReactiveDocumentOperationsQuery extracting index from entity metadata.delete in interface ReactiveDocumentOperationsquery - must not be null.entityType - must not be null.Mono emitting the number of the removed documents.protected reactor.core.publisher.Mono<String> doDelete(org.elasticsearch.action.delete.DeleteRequest request)
Publisher. request - the already prepared DeleteRequest ready to be executed.Mono emitting the result of the operation.protected reactor.core.publisher.Mono<org.elasticsearch.index.reindex.BulkByScrollResponse> doDeleteBy(org.elasticsearch.index.reindex.DeleteByQueryRequest request)
Publisher. request - the already prepared DeleteByQueryRequest ready to be executed.Mono emitting the result of the operation.protected org.elasticsearch.action.delete.DeleteRequest prepareDeleteRequest(org.elasticsearch.action.delete.DeleteRequest request)
DeleteRequest prior to its execution. Eg. by setting the
refresh policy if applicable.request - the generated DeleteRequest.protected org.elasticsearch.index.reindex.DeleteByQueryRequest prepareDeleteByRequest(org.elasticsearch.index.reindex.DeleteByQueryRequest request)
DeleteByQueryRequest prior to its execution. Eg. by setting the
refresh policy if applicable.request - the generated DeleteByQueryRequest.protected org.elasticsearch.action.index.IndexRequest prepareIndexRequest(Object source, org.elasticsearch.action.index.IndexRequest request)
IndexRequest prior to its execution. Eg. by setting the
refresh policy if applicable.source - the source object the IndexRequest was derived from.request - the generated IndexRequest.protected <R extends org.elasticsearch.action.support.WriteRequest<R>> R prepareWriteRequest(R request)
refresh policy if applicable.R - request - must not be null.WriteRequest.public <T> reactor.core.publisher.Flux<SearchHit<T>> search(Query query, Class<?> entityType, Class<T> resultType, IndexCoordinates index)
ReactiveSearchOperationsquery.search in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.resultType - the projection result type.index - the target index, must not be nullFlux emitting matching entities one by one wrapped in a SearchHit.public <T> reactor.core.publisher.Flux<SearchHit<T>> search(Query query, Class<?> entityType, Class<T> returnType)
ReactiveSearchOperationsquery. Unpaged queries may overrule elasticsearch server defaults for page size by either *
delegating to the scroll API or using a max *
size.search in interface ReactiveSearchOperationsquery - must not be null.entityType - The entity type for mapping the query. Must not be null.returnType - The mapping target type. Must not be null. ThFlux emitting matching entities one by one wrapped in a SearchHit.public <T> reactor.core.publisher.Mono<SearchPage<T>> searchForPage(Query query, Class<?> entityType, Class<T> resultType)
ReactiveSearchOperationsquery.searchForPage in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.resultType - the projection result type.Mono emitting matching entities in a SearchHits.public <T> reactor.core.publisher.Mono<SearchPage<T>> searchForPage(Query query, Class<?> entityType, Class<T> resultType, IndexCoordinates index)
ReactiveSearchOperationsquery.searchForPage in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.resultType - the projection result type.index - the target index, must not be nullMono emitting matching entities in a SearchHits.public reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> aggregate(Query query, Class<?> entityType)
ReactiveSearchOperationsquery. aggregate in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.Flux emitting matching aggregations one by one.public reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> aggregate(Query query, Class<?> entityType, IndexCoordinates index)
ReactiveSearchOperationsquery. aggregate in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.index - the target index, must not be nullFlux emitting matching aggregations one by one.public reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
Class<?> entityType)
ReactiveSearchOperationssuggest in interface ReactiveSearchOperationssuggestion - the queryentityType - must not be null.public reactor.core.publisher.Flux<org.elasticsearch.search.suggest.Suggest> suggest(org.elasticsearch.search.suggest.SuggestBuilder suggestion,
IndexCoordinates index)
ReactiveSearchOperationssuggest in interface ReactiveSearchOperationssuggestion - the queryindex - the index to run the query againstpublic reactor.core.publisher.Mono<Long> count(Query query, Class<?> entityType)
ReactiveSearchOperationsQuery.count in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.Mono emitting the nr of matching documents.public reactor.core.publisher.Mono<Long> count(Query query, Class<?> entityType, IndexCoordinates index)
ReactiveSearchOperationsQuery.count in interface ReactiveSearchOperationsquery - must not be null.entityType - must not be null.index - the target index, must not be nullMono emitting the nr of matching documents.protected reactor.core.publisher.Flux<SearchDocument> doFind(org.elasticsearch.action.search.SearchRequest request)
Publisher. request - the already prepared SearchRequest ready to be executed.Flux emitting the result of the operation converted to SearchDocuments.protected reactor.core.publisher.Mono<SearchDocumentResponse> doFindForResponse(org.elasticsearch.action.search.SearchRequest request)
Mono. request - the already prepared SearchRequest ready to be executed.Mono emitting the result of the operation converted to s SearchDocumentResponse.protected reactor.core.publisher.Flux<org.elasticsearch.search.aggregations.Aggregation> doAggregate(org.elasticsearch.action.search.SearchRequest request)
Publisher. request - the already prepared SearchRequest ready to be executed.Flux emitting the result of the operation.protected reactor.core.publisher.Mono<Long> doCount(org.elasticsearch.action.search.SearchRequest request)
Publisher. request - the already prepared SearchRequest ready to be executed.Mono emitting the result of the operation.protected reactor.core.publisher.Flux<SearchDocument> doScroll(org.elasticsearch.action.search.SearchRequest request)
Publisher. request - the already prepared SearchRequest ready to be executed.Flux emitting the result of the operation converted to SearchDocuments.protected org.elasticsearch.action.search.SearchRequest prepareSearchRequest(org.elasticsearch.action.search.SearchRequest request)
SearchRequest prior to its execution. Eg. by setting the
indices options if applicable.request - the generated SearchRequest.protected reactor.core.publisher.Mono<String> getClusterVersion()
public <T> org.reactivestreams.Publisher<T> execute(ReactiveElasticsearchOperations.ClientCallback<org.reactivestreams.Publisher<T>> callback)
ReactiveElasticsearchOperationsReactiveElasticsearchOperations.ClientCallback managing resources and translating errors.execute in interface ReactiveElasticsearchOperationsT - the type the Publisher emitscallback - must not be null.Publisher emitting results.public <T> org.reactivestreams.Publisher<T> executeWithIndicesClient(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback)
ReactiveElasticsearchOperationsReactiveElasticsearchOperations.IndicesClientCallback managing resources and translating errors.executeWithIndicesClient in interface ReactiveElasticsearchOperationsT - the type the Publisher emitscallback - must not be null.Publisher emitting results.public ElasticsearchConverter getElasticsearchConverter()
ReactiveElasticsearchOperationsElasticsearchConverter used.getElasticsearchConverter in interface ReactiveElasticsearchOperationspublic ReactiveIndexOperations indexOps(IndexCoordinates index)
ReactiveElasticsearchOperationsReactiveIndexOperations that is bound to the given indexindexOps in interface ReactiveElasticsearchOperationsindex - IndexCoordinates specifying the indexpublic ReactiveIndexOperations indexOps(Class<?> clazz)
ReactiveElasticsearchOperationsReactiveIndexOperations that is bound to the given classindexOps in interface ReactiveElasticsearchOperationsclazz - the entity clazz specifiying the index informationpublic IndexCoordinates getIndexCoordinatesFor(Class<?> clazz)
getIndexCoordinatesFor in interface ReactiveElasticsearchOperations@Nullable public ElasticsearchPersistentEntity<?> getPersistentEntityFor(@Nullable Class<?> type)
getPersistentEntityFor in interface ReactiveElasticsearchOperationsprotected ReactiveElasticsearchClient getClient()
ReactiveElasticsearchClient to operate upon.protected ReactiveElasticsearchClient.Indices getIndicesClient()
ReactiveElasticsearchClient.Indices to operate upon.protected <T> reactor.core.publisher.Mono<T> maybeCallBeforeConvert(T entity,
IndexCoordinates index)
protected <T> reactor.core.publisher.Mono<T> maybeCallAfterSave(T entity,
IndexCoordinates index)
protected <T> reactor.core.publisher.Mono<T> maybeCallAfterConvert(T entity,
Document document,
IndexCoordinates index)
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.