Package org.opensearch.data.core
Class AbstractIndexTemplate
java.lang.Object
org.opensearch.data.core.AbstractIndexTemplate
- All Implemented Interfaces:
org.springframework.data.elasticsearch.core.IndexOperations
public abstract class AbstractIndexTemplate
extends Object
implements org.springframework.data.elasticsearch.core.IndexOperations
Base implementation of
IndexOperations common to Transport and Rest based Implementations of IndexOperations.- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<?>protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex) -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<?>booleancreate()booleanbooleancreate(Map<String, Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping) org.springframework.data.elasticsearch.core.document.Documentorg.springframework.data.elasticsearch.core.document.DocumentcreateMapping(Class<?> clazz) org.springframework.data.elasticsearch.core.index.Settingsorg.springframework.data.elasticsearch.core.index.SettingscreateSettings(Class<?> clazz) booleanbooleandelete()protected abstract booleandoCreate(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, Map<String, Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping) protected abstract booleandoDelete(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index) protected abstract booleandoExists(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index) doGetAliases(String[] aliasNames, String[] indexNames) doGetMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index) protected abstract org.springframework.data.elasticsearch.core.index.SettingsdoGetSettings(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, boolean includeDefaults) protected abstract booleandoPutMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, org.springframework.data.elasticsearch.core.document.Document mapping) protected abstract voiddoRefresh(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates) booleanexists()getAliases(String... aliasNames) getAliasesForIndex(String... indexNames) org.springframework.data.elasticsearch.core.mapping.IndexCoordinatesorg.springframework.data.elasticsearch.core.mapping.IndexCoordinatesgetIndexCoordinatesFor(Class<?> clazz) org.springframework.data.elasticsearch.core.index.Settingsorg.springframework.data.elasticsearch.core.index.SettingsgetSettings(boolean includeDefaults) booleanputMapping(org.springframework.data.elasticsearch.core.document.Document mapping) voidrefresh()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.elasticsearch.core.IndexOperations
alias, deleteComponentTemplate, deleteIndexTemplate, deleteIndexTemplate, deleteTemplate, deleteTemplate, existsComponentTemplate, existsIndexTemplate, existsIndexTemplate, existsTemplate, existsTemplate, getComponentTemplate, getIndexTemplate, getIndexTemplate, getInformation, getInformation, getTemplate, getTemplate, putComponentTemplate, putIndexTemplate, putMapping, putMapping, putTemplate
-
Field Details
-
elasticsearchConverter
protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter -
boundClass
-
-
Constructor Details
-
AbstractIndexTemplate
public AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass) -
AbstractIndexTemplate
public AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex)
-
-
Method Details
-
checkForBoundClass
-
create
public boolean create()- Specified by:
createin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
createSettings
- Specified by:
createSettingsin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
createWithMapping
public boolean createWithMapping()- Specified by:
createWithMappingin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
create
- Specified by:
createin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
create
public boolean create(Map<String, Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping) - Specified by:
createin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doCreate
-
delete
public boolean delete()- Specified by:
deletein interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doDelete
protected abstract boolean doDelete(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index) -
exists
public boolean exists()- Specified by:
existsin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doExists
protected abstract boolean doExists(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index) -
putMapping
public boolean putMapping(org.springframework.data.elasticsearch.core.document.Document mapping) - Specified by:
putMappingin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doPutMapping
protected abstract boolean doPutMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, org.springframework.data.elasticsearch.core.document.Document mapping) -
getMapping
- Specified by:
getMappingin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doGetMapping
-
getSettings
public org.springframework.data.elasticsearch.core.index.Settings getSettings()- Specified by:
getSettingsin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
getSettings
public org.springframework.data.elasticsearch.core.index.Settings getSettings(boolean includeDefaults) - Specified by:
getSettingsin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doGetSettings
protected abstract org.springframework.data.elasticsearch.core.index.Settings doGetSettings(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, boolean includeDefaults) -
refresh
public void refresh()- Specified by:
refreshin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doRefresh
protected abstract void doRefresh(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates) -
getAliases
public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliases(String... aliasNames) - Specified by:
getAliasesin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
getAliasesForIndex
public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliasesForIndex(String... indexNames) - Specified by:
getAliasesForIndexin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
doGetAliases
-
createMapping
public org.springframework.data.elasticsearch.core.document.Document createMapping()- Specified by:
createMappingin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
createMapping
- Specified by:
createMappingin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
createSettings
public org.springframework.data.elasticsearch.core.index.Settings createSettings()- Specified by:
createSettingsin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
getIndexCoordinates
public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinates()- Specified by:
getIndexCoordinatesin interfaceorg.springframework.data.elasticsearch.core.IndexOperations
-
getIndexCoordinatesFor
public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinatesFor(Class<?> clazz)
-