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 Details

    • create

      reactor.core.publisher.Mono<Boolean> create()
      Create an index.
      Returns:
      a Mono signalling successful operation completion or an error if eg. the index already exist.
    • create

      reactor.core.publisher.Mono<Boolean> create(Map<String,Object> settings)
      Create an index with the specified settings.
      Parameters:
      settings - index settings
      Returns:
      a Mono signalling successful operation completion or an error if eg. the index already exist.
    • create

      reactor.core.publisher.Mono<Boolean> create(Map<String,Object> settings, Document mapping)
      Create an index for given settings and mapping.
      Parameters:
      settings - the index settings
      mapping - the index mapping
      Returns:
      a Mono signalling successful operation completion or an error 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 an error 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 an error. 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

      reactor.core.publisher.Mono<Document> createMapping(Class<?> clazz)
      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

      default reactor.core.publisher.Mono<Boolean> putMapping()
      Writes the mapping to the index for the class this IndexOperations is bound to.
      Returns:
      true if the mapping could be stored
    • putMapping

      reactor.core.publisher.Mono<Boolean> putMapping(reactor.core.publisher.Mono<Document> mapping)
      writes a mapping to the index
      Parameters:
      mapping - the Document with the mapping definitions
      Returns:
      true if the mapping could be stored
    • putMapping

      default reactor.core.publisher.Mono<Boolean> putMapping(Class<?> clazz)
      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 this ReactiveIndexOperations
      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

      reactor.core.publisher.Mono<Settings> createSettings(Class<?> clazz)
      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

      default reactor.core.publisher.Mono<Settings> getSettings()
      get the settings for the index
      Returns:
      a Mono with a Document containing the index settings
    • getSettings

      reactor.core.publisher.Mono<Settings> getSettings(boolean includeDefaults)
      get the settings for the index
      Parameters:
      includeDefaults - whether or not to include all the default settings
      Returns:
      a Mono with a Document containing the index settings
    • alias

      reactor.core.publisher.Mono<Boolean> alias(AliasActions aliasActions)
      Executes the given AliasActions.
      Parameters:
      aliasActions - the actions to execute
      Returns:
      if the operation is acknowledged by Elasticsearch
      Since:
      4.1
    • getAliases

      reactor.core.publisher.Mono<Map<String,Set<AliasData>>> getAliases(String... aliasNames)
      gets information about aliases
      Parameters:
      aliasNames - alias names, must not be null
      Returns:
      a Mono of Map from index names to AliasData for that index
      Since:
      4.1
    • getAliasesForIndex

      reactor.core.publisher.Mono<Map<String,Set<AliasData>>> getAliasesForIndex(String... indexNames)
      gets information about aliases
      Parameters:
      indexNames - alias names, must not be null
      Returns:
      a Mono of Map from index names to AliasData for that index
      Since:
      4.1
    • putTemplate

      reactor.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)
      Parameters:
      putTemplateRequest - template request parameters
      Returns:
      Mono of true if the template could be stored
      Since:
      4.1
    • getTemplate

      default reactor.core.publisher.Mono<TemplateData> getTemplate(String templateName)
      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

      reactor.core.publisher.Mono<TemplateData> getTemplate(GetTemplateRequest getTemplateRequest)
      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

      default 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)
      Parameters:
      templateName - the template name
      Returns:
      Mono of true if the template exists
      Since:
      4.1
    • existsTemplate

      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)
      Parameters:
      existsTemplateRequest - template request parameters
      Returns:
      Mono of true if the template exists
      Since:
      4.1
    • deleteTemplate

      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)
      Parameters:
      templateName - the template name
      Returns:
      Mono of true if the template could be deleted
      Since:
      4.1
    • deleteTemplate

      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)
      Parameters:
      deleteTemplateRequest - template request parameters
      Returns:
      Mono of true if the template could be deleted
      Since:
      4.1
    • getInformation

      default reactor.core.publisher.Flux<IndexInformation> getInformation()
      Gets the IndexInformation for the indices defined by getIndexCoordinates().
      Returns:
      a flux of IndexInformation
      Since:
      4.2
    • getInformation

      reactor.core.publisher.Flux<IndexInformation> getInformation(IndexCoordinates index)
      Gets the IndexInformation for the indices defined by getIndexCoordinates().
      Returns:
      a flux of IndexInformation
      Since:
      4.2
    • getIndexCoordinates

      IndexCoordinates getIndexCoordinates()
      get the current IndexCoordinates. 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