Class OpenSearchIndexManager


  • public class OpenSearchIndexManager
    extends Object
    Listen to any create / update and delete in order to keep the OpenSearch indexes consistent.
    • Field Detail

      • client

        protected final org.opensearch.client.opensearch.OpenSearchClient client
      • numberOfShards

        protected final String numberOfShards
      • numberOfReplicas

        protected final String numberOfReplicas
    • Constructor Detail

      • OpenSearchIndexManager

        public OpenSearchIndexManager​(org.opensearch.client.opensearch.OpenSearchClient client,
                                      OpenSearchUtils ppenSearchUtils,
                                      String numberOfShards,
                                      String numberOfReplicas)
    • Method Detail

      • defaultSettings

        public org.opensearch.client.opensearch.indices.IndexSettings defaultSettings()
                                                                               throws IOException
        Throws:
        IOException
      • defaultAnyMapping

        public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultAnyMapping()
                                                                                      throws IOException
        Throws:
        IOException
      • defaultRealmMapping

        public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultRealmMapping()
                                                                                        throws IOException
        Throws:
        IOException
      • defaultAuditMapping

        public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultAuditMapping()
                                                                                        throws IOException
        Throws:
        IOException
      • doCreateAnyIndex

        protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateAnyIndex​(String domain,
                                                                                                AnyTypeKind kind,
                                                                                                org.opensearch.client.opensearch.indices.IndexSettings settings,
                                                                                                org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                                                                                         throws IOException
        Throws:
        IOException
      • createAnyIndex

        public void createAnyIndex​(String domain,
                                   AnyTypeKind kind,
                                   org.opensearch.client.opensearch.indices.IndexSettings settings,
                                   org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                            throws IOException
        Throws:
        IOException
      • doCreateRealmIndex

        protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateRealmIndex​(String domain,
                                                                                                  org.opensearch.client.opensearch.indices.IndexSettings settings,
                                                                                                  org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                                                                                           throws IOException
        Throws:
        IOException
      • createRealmIndex

        public void createRealmIndex​(String domain,
                                     org.opensearch.client.opensearch.indices.IndexSettings settings,
                                     org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                              throws IOException
        Throws:
        IOException
      • doCreateAuditIndex

        protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateAuditIndex​(String domain,
                                                                                                  org.opensearch.client.opensearch.indices.IndexSettings settings,
                                                                                                  org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                                                                                           throws IOException
        Throws:
        IOException
      • createAuditIndex

        public void createAuditIndex​(String domain,
                                     org.opensearch.client.opensearch.indices.IndexSettings settings,
                                     org.opensearch.client.opensearch._types.mapping.TypeMapping mappings)
                              throws IOException
        Throws:
        IOException