public interface IndexOperations
ElasticsearchOperations.indexOps(IndexCoordinates) or ElasticsearchOperations.indexOps(Class)| Modifier and Type | Method and Description |
|---|---|
boolean |
addAlias(AliasQuery query)
Deprecated.
since 4.1 use
alias(AliasActions) |
boolean |
alias(AliasActions aliasActions)
Executes the given
AliasActions. |
boolean |
create()
Create an index.
|
boolean |
create(Document settings)
Create an index for given Settings.
|
Document |
createMapping()
Creates the index mapping for the entity this IndexOperations is bound to.
|
Document |
createMapping(Class<?> clazz)
Creates the index mapping for the given class
|
Document |
createSettings()
Creates the index settings for the entity this IndexOperations is bound to.
|
Document |
createSettings(Class<?> clazz)
Creates the index settings from the annotations on the given class
|
boolean |
delete()
Deletes the index this
IndexOperations is bound to |
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).
|
default 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).
|
boolean |
exists()
Checks if the index this IndexOperations is bound to exists
|
boolean |
existsTemplate(ExistsTemplateRequest existsTemplateRequest)
check if an index template exists using the legacy Elasticsearch
interface/Users/peter/Entwicklung/Projekte/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java.
|
default boolean |
existsTemplate(String templateName)
check if an index template exists using the legacy Elasticsearch
interface/Users/peter/Entwicklung/Projekte/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java.
|
Map<String,Set<AliasData>> |
getAliases(String... aliasNames)
gets information about aliases
|
Map<String,Set<AliasData>> |
getAliasesForIndex(String... indexNames)
gets information about aliases
|
IndexCoordinates |
getIndexCoordinates()
get the current
IndexCoordinates. |
Map<String,Object> |
getMapping()
Get mapping for an index defined by a class.
|
Map<String,Object> |
getSettings()
Get the index settings.
|
Map<String,Object> |
getSettings(boolean includeDefaults)
Get the index settings.
|
TemplateData |
getTemplate(GetTemplateRequest getTemplateRequest)
gets an index template using the legacy Elasticsearch
interface/Users/peter/Entwicklung/Projekte/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java.
|
default TemplateData |
getTemplate(String templateName)
gets an index template using the legacy Elasticsearch
interface/Users/peter/Entwicklung/Projekte/spring-data-elasticsearch/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java.
|
default boolean |
putMapping()
Writes the mapping to the index for the class this IndexOperations is bound to.
|
default boolean |
putMapping(Class<?> clazz)
Creates the index mapping for the given class and writes it to the index.
|
boolean |
putMapping(Document mapping)
writes a mapping to the index
|
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).
|
List<org.elasticsearch.cluster.metadata.AliasMetadata> |
queryForAlias()
Deprecated.
since 4.1, use
getAliases(String...) or getAliasesForIndex(String...). |
void |
refresh()
Refresh the index(es) this IndexOperations is bound to
|
boolean |
removeAlias(AliasQuery query)
Deprecated.
since 4.1 use
alias(AliasActions) |
boolean create()
boolean create(Document settings)
settings - the index settingsboolean delete()
IndexOperations is bound toboolean exists()
void refresh()
Document createMapping()
Document createMapping(Class<?> clazz)
clazz - the clazz to create a mapping fordefault boolean putMapping()
boolean putMapping(Document mapping)
mapping - the Document with the mapping definitionsdefault boolean putMapping(Class<?> clazz)
clazz - the clazz to create a mapping forDocument createSettings()
Document createSettings(Class<?> clazz)
clazz - the class to create the index settings fromMap<String,Object> getMapping()
Map<String,Object> getSettings(boolean includeDefaults)
includeDefaults - whether or not to include all the default settings@Deprecated boolean addAlias(AliasQuery query)
alias(AliasActions)query - query defining the alias@Deprecated List<org.elasticsearch.cluster.metadata.AliasMetadata> queryForAlias()
getAliases(String...) or getAliasesForIndex(String...).@Deprecated boolean removeAlias(AliasQuery query)
alias(AliasActions)query - query defining the aliasboolean alias(AliasActions aliasActions)
AliasActions.aliasActions - the actions to executeMap<String,Set<AliasData>> getAliases(String... aliasNames)
Map<String,Set<AliasData>> getAliasesForIndex(String... indexNames)
boolean putTemplate(PutTemplateRequest putTemplateRequest)
putTemplateRequest - template request parameters@Nullable default TemplateData getTemplate(String templateName)
templateName - the template name@Nullable TemplateData getTemplate(GetTemplateRequest getTemplateRequest)
getTemplateRequest - the request parametersdefault boolean existsTemplate(String templateName)
templateName - the template nameboolean existsTemplate(ExistsTemplateRequest existsTemplateRequest)
existsTemplateRequest - the request parametersdefault boolean deleteTemplate(String templateName)
templateName - the template nameboolean deleteTemplate(DeleteTemplateRequest deleteTemplateRequest)
deleteTemplateRequest - template request parametersIndexCoordinates getIndexCoordinates()
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.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.