public interface IndexOperations
ElasticsearchOperations.indexOps(IndexCoordinates) or ElasticsearchOperations.indexOps(Class)| Modifier and Type | Method and Description |
|---|---|
boolean |
alias(AliasActions aliasActions)
Executes the given
AliasActions. |
boolean |
create()
Create an index.
|
boolean |
create(Map<String,Object> settings)
Create an index for given settings.
|
boolean |
create(Map<String,Object> settings,
Document mapping)
Create an index for given settings and mapping.
|
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
|
Settings |
createSettings()
Creates the index settings for the entity this IndexOperations is bound to.
|
Settings |
createSettings(Class<?> clazz)
Creates the index settings from the annotations on the given class
|
boolean |
createWithMapping()
Create an index with the settings and mapping defined for the entity this IndexOperations is bound to.
|
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.
|
default boolean |
existsTemplate(String templateName)
check if an index template exists using the legacy Elasticsearch interface.
|
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. |
default List<IndexInformation> |
getInformation()
Gets the
IndexInformation for the indices defined by getIndexCoordinates(). |
List<IndexInformation> |
getInformation(IndexCoordinates index)
Gets the
IndexInformation for the indices defined by #index. |
Map<String,Object> |
getMapping()
Get mapping for an index defined by a class.
|
Settings |
getSettings()
Get the index settings.
|
Settings |
getSettings(boolean includeDefaults)
Get the index settings.
|
TemplateData |
getTemplate(GetTemplateRequest getTemplateRequest)
gets an index template using the legacy Elasticsearch interface.
|
default TemplateData |
getTemplate(String templateName)
gets an index template using the legacy Elasticsearch interface.
|
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).
|
void |
refresh()
Refresh the index(es) this IndexOperations is bound to
|
boolean create()
boolean create(Map<String,Object> settings)
settings - the index settingsboolean create(Map<String,Object> settings, Document mapping)
settings - the index settingsmapping - the index mappingboolean createWithMapping()
boolean 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 forMap<String,Object> getMapping()
Settings createSettings()
Settings createSettings(Class<?> clazz)
clazz - the class to create the index settings fromSettings getSettings()
Settings getSettings(boolean includeDefaults)
includeDefaults - whether or not to include all the default settingsboolean 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 parametersdefault List<IndexInformation> getInformation()
IndexInformation for the indices defined by getIndexCoordinates().IndexInformationList<IndexInformation> getInformation(IndexCoordinates index)
IndexInformation for the indices defined by #index.index - defines the index names to get the information forIndexInformationIndexCoordinates 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–2022 Pivotal Software, Inc.. All rights reserved.