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.default reactor.core.publisher.Mono<Boolean>
deleteTemplate
(String templateName) Deletes an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)reactor.core.publisher.Mono<Boolean>
deleteTemplate
(DeleteTemplateRequest deleteTemplateRequest) Deletes an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)reactor.core.publisher.Mono<Boolean>
exists()
checks if an index existsdefault reactor.core.publisher.Mono<Boolean>
existsTemplate
(String templateName) 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)reactor.core.publisher.Mono<Boolean>
existsTemplate
(ExistsTemplateRequest existsTemplateRequest) 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)getAliases
(String... aliasNames) gets information about aliasesgetAliasesForIndex
(String... indexNames) gets information about aliasesget the currentIndexCoordinates
.default reactor.core.publisher.Flux<IndexInformation>
Gets theIndexInformation
for the indices defined bygetIndexCoordinates()
.reactor.core.publisher.Flux<IndexInformation>
getInformation
(IndexCoordinates index) Gets theIndexInformation
for the indices defined bygetIndexCoordinates()
.reactor.core.publisher.Mono<Document>
Get mapping for the index targeted defined by thisReactiveIndexOperations
default 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) gets an index template using the legacy Elasticsearch interface.reactor.core.publisher.Mono<TemplateData>
getTemplate
(GetTemplateRequest getTemplateRequest) gets an index template using the legacy Elasticsearch interface.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) Creates an index template using the legacy Elasticsearch interface (@see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)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
Mono
signalling successful operation completion or anerror
if eg. the index already exist.
-
create
Create an index with the specified settings.- Parameters:
settings
- index settings- Returns:
- a
Mono
signalling successful operation completion or anerror
if eg. the index already exist.
-
create
Create an index for given settings and mapping.- Parameters:
settings
- the index settingsmapping
- the index mapping- Returns:
- a
Mono
signalling successful operation completion or anerror
if 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
Mono
signalling successful operation completion or anerror
if eg. the index already exist. - Since:
- 4.2
-
delete
reactor.core.publisher.Mono<Boolean> delete()Delete an index.- Returns:
- a
Mono
signalling 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
Mono
with the result of exist check
-
refresh
reactor.core.publisher.Mono<Void> refresh()Refresh the index(es) this IndexOperations is bound to- Returns:
- a
Mono
signalling 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
Mono
with 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
Mono
with aDocument
containing the index settings
-
getSettings
get the settings for the index- Parameters:
includeDefaults
- whether or not to include all the default settings- Returns:
- a
Mono
with aDocument
containing 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
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
-
getTemplate
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
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
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
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
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
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 theIndexInformation
for the indices defined bygetIndexCoordinates()
.- Returns:
- a flux of
IndexInformation
- Since:
- 4.2
-
getInformation
Gets theIndexInformation
for 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
-