Interface OpenSearchIndexManager
-
- All Superinterfaces:
org.springframework.beans.factory.DisposableBean
- All Known Implementing Classes:
OpenSearchIndexManagerFactory.OpenSearchIndexManagerImpl
public interface OpenSearchIndexManager extends org.springframework.beans.factory.DisposableBeanProvides operations to manage an OpenSearch index and its settings- Since:
- 8.8
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreate()Create the index on OpenSearch.voiddelete()Delete the index from OpenSearch.voidensureExists()Create an index on OpenSearch based on the provided settingsbooleanexists()FieldMappingsgetFieldMappings()Get or add field mappings on this index.IndexgetIndex()StringgetIndexName()voidrecreate()Create the new index on OpenSearch based on the provided settings.
-
-
-
Method Detail
-
getIndex
Index getIndex()
- Returns:
- the index managed by this instance
-
getIndexName
String getIndexName()
- Returns:
- the name of the index on OpenSearch
-
getFieldMappings
FieldMappings getFieldMappings()
Get or add field mappings on this index.- Returns:
- field mappings
-
exists
boolean exists() throws IOException- Returns:
- true if the index exists, or false if it does not exist
- Throws:
IOException
-
ensureExists
void ensureExists() throws IOExceptionCreate an index on OpenSearch based on the provided settings- Throws:
IOException
-
create
void create() throws IOExceptionCreate the index on OpenSearch. This will throw an exception if the index already exists.- Throws:
IOException
-
delete
void delete() throws IOExceptionDelete the index from OpenSearch.- Throws:
IOException
-
recreate
void recreate() throws IOExceptionCreate the new index on OpenSearch based on the provided settings. If it already exists, it will be deleted first.- Throws:
IOException
-
-