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 TypeMethodDescriptionalias(AliasActions aliasActions) Executes the givenAliasActions.create()Create an index.Create an index with the specified settings.Create an index for given settings and mapping.Creates the index mapping for the entity this IndexOperations is bound to.createMapping(Class<?> clazz) Creates the index mapping for the given classCreates the index settings for the entity this IndexOperations is bound to.createSettings(Class<?> clazz) Creates the index settings from the annotations on the given classCreate an index with the settings and mapping defined for the entity this IndexOperations is bound to.delete()Delete an index.deleteComponentTemplate(DeleteComponentTemplateRequest deleteComponentTemplateRequest) Deletes a component index template.deleteIndexTemplate(String indexTemplateName) Deletes an index template.deleteIndexTemplate(DeleteIndexTemplateRequest deleteIndexTemplateRequest) Deletes an index template.deleteTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.deleteTemplate(DeleteTemplateRequest deleteTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.exists()checks if an index existsexistsComponentTemplate(ExistsComponentTemplateRequest existsComponentTemplateRequest) Checks wether a component index template exists.existsIndexTemplate(String indexTemplateName) Checks if an index template exists.existsIndexTemplate(ExistsIndexTemplateRequest existsIndexTemplateRequest) Checks if an index template exists.existsTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.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 aliasesgetComponentTemplate(GetComponentTemplateRequest getComponentTemplateRequest) Get component template(s).get the currentIndexCoordinates.default Flux<TemplateResponse>getIndexTemplate(String indexTemplateName) Get index template(s).getIndexTemplate(GetIndexTemplateRequest getIndexTemplateRequest) Get index template(s).default Flux<IndexInformation>Gets theIndexInformationfor the indices defined bygetIndexCoordinates().getInformation(IndexCoordinates index) Gets theIndexInformationfor the indices defined bygetIndexCoordinates().Get mapping for the index targeted defined by thisReactiveIndexOperationsget the settings for the indexgetSettings(boolean includeDefaults) get the settings for the indexdefault Mono<TemplateData>getTemplate(String templateName) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.getTemplate(GetTemplateRequest getTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.putComponentTemplate(PutComponentTemplateRequest putComponentTemplateRequest) Writes a component index template that can be used in a composable index template.putIndexTemplate(PutIndexTemplateRequest putIndexTemplateRequest) Creates an index template.Writes the mapping to the index for the class this IndexOperations is bound to.putMapping(Class<?> clazz) Creates the index mapping for the given class and writes it to the index.putMapping(Mono<Document> mapping) writes a mapping to the indexputTemplate(PutTemplateRequest putTemplateRequest) Deprecated.since 5.1, as the underlying Elasticsearch API is deprecated.refresh()Refresh the index(es) this IndexOperations is bound to
-
Method Details
-
create
Create an index. -
create
Create an index with the specified settings. -
create
Create an index for given settings and mapping. -
createWithMapping
Create an index with the settings and mapping defined for the entity this IndexOperations is bound to. -
delete
Delete an index. -
exists
checks if an index exists- Returns:
- a
Monowith the result of exist check
-
refresh
Refresh the index(es) this IndexOperations is bound to- Returns:
- a
Monosignalling operation completion.
-
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
Get mapping for the index targeted defined by thisReactiveIndexOperations- Returns:
- the mapping
-
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 -
getSettings
get the settings for the index -
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
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
Flux<TemplateResponse> getComponentTemplate(GetComponentTemplateRequest getComponentTemplateRequest) Get component template(s).- Parameters:
getComponentTemplateRequest- the getComponentTemplateRequest parameters- Returns:
- a
FluxofTemplateResponse - Since:
- 5.1
-
existsComponentTemplate
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
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
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
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
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
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.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.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.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
-