Interface ReactiveIndexOperations
- All Known Implementing Classes:
ReactiveIndicesTemplate
public interface ReactiveIndexOperations
Interface defining operations on indexes for the reactive stack.
- Since:
- 4.1
- Author:
- Peter-Josef Meisch, George Popides
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean>alias(AliasActions aliasActions) Executes the givenAliasActions.reactor.core.publisher.Mono<Boolean>create()Create an index.reactor.core.publisher.Mono<Boolean>Create an index with the specified settings.reactor.core.publisher.Mono<Boolean>Create an index for given settings and mapping.reactor.core.publisher.Mono<Document>Creates the index mapping for the entity this IndexOperations is bound to.reactor.core.publisher.Mono<Document>createMapping(Class<?> clazz) Creates the index mapping for the given classreactor.core.publisher.Mono<Settings>Creates the index settings for the entity this IndexOperations is bound to.reactor.core.publisher.Mono<Settings>createSettings(Class<?> clazz) Creates the index settings from the annotations on the given classreactor.core.publisher.Mono<Boolean>Create an index with the settings and mapping defined for the entity this IndexOperations is bound to.reactor.core.publisher.Mono<Boolean>delete()Delete an index.reactor.core.publisher.Mono<Boolean>deleteComponentTemplate(DeleteComponentTemplateRequest deleteComponentTemplateRequest) Deletes a component index template.default reactor.core.publisher.Mono<Boolean>deleteIndexTemplate(String indexTemplateName) Deletes an index template.reactor.core.publisher.Mono<Boolean>deleteIndexTemplate(DeleteIndexTemplateRequest deleteIndexTemplateRequest) Deletes an index template.default reactor.core.publisher.Mono<Boolean>deleteTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<Boolean>deleteTemplate(DeleteTemplateRequest deleteTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<Boolean>exists()checks if an index existsreactor.core.publisher.Mono<Boolean>existsComponentTemplate(ExistsComponentTemplateRequest existsComponentTemplateRequest) Checks wether a component index template exists.default reactor.core.publisher.Mono<Boolean>existsIndexTemplate(String indexTemplateName) Checks if an index template exists.reactor.core.publisher.Mono<Boolean>existsIndexTemplate(ExistsIndexTemplateRequest existsIndexTemplateRequest) Checks if an index template exists.default reactor.core.publisher.Mono<Boolean>existsTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<Boolean>existsTemplate(ExistsTemplateRequest existsTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.getAliases(String... aliasNames) gets information about aliasesgetAliasesForIndex(String... indexNames) gets information about aliasesreactor.core.publisher.Flux<TemplateResponse>getComponentTemplate(GetComponentTemplateRequest getComponentTemplateRequest) Get component template(s).get the currentIndexCoordinates.default reactor.core.publisher.Flux<TemplateResponse>getIndexTemplate(String indexTemplateName) Get index template(s).reactor.core.publisher.Flux<TemplateResponse>getIndexTemplate(GetIndexTemplateRequest getIndexTemplateRequest) Get index template(s).default reactor.core.publisher.Flux<IndexInformation>Gets theIndexInformationfor the indices defined bygetIndexCoordinates().reactor.core.publisher.Flux<IndexInformation>getInformation(IndexCoordinates index) Gets theIndexInformationfor the indices defined bygetIndexCoordinates().reactor.core.publisher.Mono<Document>Get mapping for the index targeted defined by thisReactiveIndexOperationsdefault reactor.core.publisher.Mono<Settings>get the settings for the indexreactor.core.publisher.Mono<Settings>getSettings(boolean includeDefaults) get the settings for the indexdefault reactor.core.publisher.Mono<TemplateData>getTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<TemplateData>getTemplate(GetTemplateRequest getTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<Boolean>putComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest) Writes a component index template that can be used in a composable index template.reactor.core.publisher.Mono<Boolean>putIndexTemplate(PutIndexTemplateRequest putIndexTemplateRequest) Creates an index template.default reactor.core.publisher.Mono<Boolean>Writes the mapping to the index for the class this IndexOperations is bound to.default reactor.core.publisher.Mono<Boolean>putMapping(Class<?> clazz) Creates the index mapping for the given class and writes it to the index.reactor.core.publisher.Mono<Boolean>putMapping(reactor.core.publisher.Mono<Document> mapping) writes a mapping to the indexreactor.core.publisher.Mono<Boolean>putTemplate(PutTemplateRequest putTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.reactor.core.publisher.Mono<Void>refresh()Refresh the index(es) this IndexOperations is bound to
-
Method Details
-
create
reactor.core.publisher.Mono<Boolean> create()Create an index.- Returns:
- a
Monosignalling successful operation completion or anerrorif eg. the index already exist.
-
create
Create an index with the specified settings.- Parameters:
settings- index settings- Returns:
- a
Monosignalling successful operation completion or anerrorif eg. the index already exist.
-
create
Create an index for given settings and mapping.- Parameters:
settings- the index settingsmapping- the index mapping- Returns:
- a
Monosignalling successful operation completion or anerrorif eg. the index already exist. - Since:
- 4.2
-
createWithMapping
reactor.core.publisher.Mono<Boolean> createWithMapping()Create an index with the settings and mapping defined for the entity this IndexOperations is bound to.- Returns:
- a
Monosignalling successful operation completion or anerrorif eg. the index already exist. - Since:
- 4.2
-
delete
reactor.core.publisher.Mono<Boolean> delete()Delete an index.- Returns:
- a
Monosignalling operation completion or anerror. If the index does not exist, a value of false is emitted.
-
exists
reactor.core.publisher.Mono<Boolean> exists()checks if an index exists- Returns:
- a
Monowith the result of exist check
-
refresh
reactor.core.publisher.Mono<Void> refresh()Refresh the index(es) this IndexOperations is bound to- Returns:
- a
Monosignalling operation completion.
-
createMapping
reactor.core.publisher.Mono<Document> createMapping()Creates the index mapping for the entity this IndexOperations is bound to.- Returns:
- mapping object
-
createMapping
Creates the index mapping for the given class- Parameters:
clazz- the clazz to create a mapping for- Returns:
- a
Monowith the mapping document
-
putMapping
Writes the mapping to the index for the class this IndexOperations is bound to.- Returns:
- true if the mapping could be stored
-
putMapping
writes a mapping to the index- Parameters:
mapping- the Document with the mapping definitions- Returns:
- true if the mapping could be stored
-
putMapping
Creates the index mapping for the given class and writes it to the index.- Parameters:
clazz- the clazz to create a mapping for- Returns:
- true if the mapping could be stored
-
getMapping
reactor.core.publisher.Mono<Document> getMapping()Get mapping for the index targeted defined by thisReactiveIndexOperations- Returns:
- the mapping
-
createSettings
reactor.core.publisher.Mono<Settings> createSettings()Creates the index settings for the entity this IndexOperations is bound to.- Returns:
- a settings document.
- Since:
- 4.1
-
createSettings
Creates the index settings from the annotations on the given class- Parameters:
clazz- the class to create the index settings from- Returns:
- a settings document.
- Since:
- 4.1
-
getSettings
get the settings for the index- Returns:
- a
Monowith aDocumentcontaining the index settings
-
getSettings
get the settings for the index- Parameters:
includeDefaults- whether or not to include all the default settings- Returns:
- a
Monowith aDocumentcontaining the index settings
-
alias
Executes the givenAliasActions.- Parameters:
aliasActions- the actions to execute- Returns:
- if the operation is acknowledged by Elasticsearch
- Since:
- 4.1
-
getAliases
gets information about aliases -
getAliasesForIndex
gets information about aliases -
putTemplate
Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.Creates an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)- Parameters:
putTemplateRequest- template request parameters- Returns:
- Mono of true if the template could be stored
- Since:
- 4.1
-
putComponentTemplate
reactor.core.publisher.Mono<Boolean> putComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest) Writes a component index template that can be used in a composable index template.- Parameters:
putComponentTemplateRequest- index template request parameters- Returns:
- true if successful
- Since:
- 5.1
-
getComponentTemplate
reactor.core.publisher.Flux<TemplateResponse> getComponentTemplate(GetComponentTemplateRequest getComponentTemplateRequest) Get component template(s).- Parameters:
getComponentTemplateRequest- the getComponentTemplateRequest parameters- Returns:
- a
FluxofTemplateResponse - Since:
- 5.1
-
existsComponentTemplate
reactor.core.publisher.Mono<Boolean> existsComponentTemplate(ExistsComponentTemplateRequest existsComponentTemplateRequest) Checks wether a component index template exists.- Parameters:
existsComponentTemplateRequest- the parameters for the request- Returns:
- Mono with the value if the componentTemplate exists.
- Since:
- 5.1
-
deleteComponentTemplate
reactor.core.publisher.Mono<Boolean> deleteComponentTemplate(DeleteComponentTemplateRequest deleteComponentTemplateRequest) Deletes a component index template.- Parameters:
deleteComponentTemplateRequest- the parameters for the request- Returns:
- Mono with the value if the request was acknowledged.
- Since:
- 5.1
-
putIndexTemplate
reactor.core.publisher.Mono<Boolean> putIndexTemplate(PutIndexTemplateRequest putIndexTemplateRequest) Creates an index template.- Parameters:
putIndexTemplateRequest- template request parameters- Returns:
- true if successful
- Since:
- 5.1
-
existsIndexTemplate
Checks if an index template exists.- Parameters:
indexTemplateName- the name of the index template- Returns:
- Mono with the value if the index template exists.
- Since:
- 5.1
-
existsIndexTemplate
reactor.core.publisher.Mono<Boolean> existsIndexTemplate(ExistsIndexTemplateRequest existsIndexTemplateRequest) Checks if an index template exists.- Parameters:
existsIndexTemplateRequest- the parameters for the request- Returns:
- Mono with the value if the index template exists.
- Since:
- 5.1
-
getIndexTemplate
Get index template(s).- Parameters:
indexTemplateName- the name of the index template- Returns:
- a
FluxofTemplateResponse - Since:
- 5.1
-
getIndexTemplate
reactor.core.publisher.Flux<TemplateResponse> getIndexTemplate(GetIndexTemplateRequest getIndexTemplateRequest) Get index template(s).- Parameters:
getIndexTemplateRequest-- Returns:
- a
FluxofTemplateResponse - Since:
- 5.1
-
deleteIndexTemplate
Deletes an index template.- Parameters:
indexTemplateName- the name of the index template- Returns:
- Mono with the value if the request was acknowledged.
- Since:
- 5.1
-
deleteIndexTemplate
reactor.core.publisher.Mono<Boolean> deleteIndexTemplate(DeleteIndexTemplateRequest deleteIndexTemplateRequest) Deletes an index template.- Parameters:
deleteIndexTemplateRequest- the parameters for the request- Returns:
- Mono with the value if the request was acknowledged.
- Since:
- 5.1
-
getTemplate
Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.gets an index template using the legacy Elasticsearch interface.- Parameters:
templateName- the template name- Returns:
- Mono of TemplateData, Mono.empty() if no template with the given name exists.
- Since:
- 4.1
-
getTemplate
@Deprecated reactor.core.publisher.Mono<TemplateData> getTemplate(GetTemplateRequest getTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.gets an index template using the legacy Elasticsearch interface.- Parameters:
getTemplateRequest- the request parameters- Returns:
- Mono of TemplateData, Mono.empty() if no template with the given name exists.
- Since:
- 4.1
-
existsTemplate
Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.Checks if an index template exists using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)- Parameters:
templateName- the template name- Returns:
- Mono of true if the template exists
- Since:
- 4.1
-
existsTemplate
@Deprecated reactor.core.publisher.Mono<Boolean> existsTemplate(ExistsTemplateRequest existsTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.Checks if an index template exists using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)- Parameters:
existsTemplateRequest- template request parameters- Returns:
- Mono of true if the template exists
- Since:
- 4.1
-
deleteTemplate
Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.Deletes an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)- Parameters:
templateName- the template name- Returns:
- Mono of true if the template could be deleted
- Since:
- 4.1
-
deleteTemplate
@Deprecated reactor.core.publisher.Mono<Boolean> deleteTemplate(DeleteTemplateRequest deleteTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.Deletes an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)- Parameters:
deleteTemplateRequest- template request parameters- Returns:
- Mono of true if the template could be deleted
- Since:
- 4.1
-
getInformation
Gets theIndexInformationfor the indices defined bygetIndexCoordinates().- Returns:
- a flux of
IndexInformation - Since:
- 4.2
-
getInformation
Gets theIndexInformationfor the indices defined bygetIndexCoordinates().- Returns:
- a flux of
IndexInformation - Since:
- 4.2
-
getIndexCoordinates
IndexCoordinates getIndexCoordinates()get the currentIndexCoordinates. These may change over time when the entity class has a SpEL constructed index name. When this IndexOperations is not bound to a class, the bound IndexCoordinates are returned.- Returns:
- IndexCoordinates
- Since:
- 4.1
-