Interface OpenSearchIndexManager
-
- All Superinterfaces:
org.springframework.beans.factory.DisposableBean
- All Known Implementing Classes:
OpenSearchIndexManagerFactory.OpenSearchIndexManagerImpl
public interface OpenSearchIndexManager extends org.springframework.beans.factory.DisposableBean
Provides 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 void
create()
Create the index on OpenSearch.void
delete()
Delete the index from OpenSearch.void
ensureExists()
Create an index on OpenSearch based on the provided settingsboolean
exists()
FieldMappings
getFieldMappings()
Get or add field mappings on this index.Index
getIndex()
String
getIndexName()
void
recreate()
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 IOException
Create an index on OpenSearch based on the provided settings- Throws:
IOException
-
create
void create() throws IOException
Create the index on OpenSearch. This will throw an exception if the index already exists.- Throws:
IOException
-
delete
void delete() throws IOException
Delete the index from OpenSearch.- Throws:
IOException
-
recreate
void recreate() throws IOException
Create the new index on OpenSearch based on the provided settings. If it already exists, it will be deleted first.- Throws:
IOException
-
-