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 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
      • 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