Class OpenSearchIndexManager

java.lang.Object
io.jmix.search.index.impl.BaseIndexManager<org.opensearch.client.opensearch.indices.IndexState,org.opensearch.client.opensearch.indices.IndexSettings,org.opensearch.client.json.JsonpSerializable>
io.jmix.searchopensearch.index.impl.OpenSearchIndexManager
All Implemented Interfaces:
IndexManager

public class OpenSearchIndexManager extends BaseIndexManager<org.opensearch.client.opensearch.indices.IndexState,org.opensearch.client.opensearch.indices.IndexSettings,org.opensearch.client.json.JsonpSerializable>
Implementation for OpenSearch
  • Field Details

    • client

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

      protected final OpenSearchIndexSettingsProvider indexSettingsProcessor
    • putMappingRequestBuilder

      protected final OpenSearchPutMappingRequestBuilder putMappingRequestBuilder
    • objectMapper

      protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
  • Constructor Details

  • Method Details

    • createIndex

      public boolean createIndex(IndexConfiguration indexConfiguration)
      Description copied from interface: IndexManager
      Creates index if not exists using provided IndexConfiguration.
      Parameters:
      indexConfiguration - index configuration
      Returns:
      true if index was successfully created, false otherwise
    • dropIndex

      public boolean dropIndex(String indexName)
      Description copied from interface: IndexManager
      Drops index by name.
      Parameters:
      indexName - index name
      Returns:
      true if index was successfully dropped, false otherwise
    • isIndexExist

      public boolean isIndexExist(String indexName)
      Description copied from interface: IndexManager
      Checks if index exists.
      Parameters:
      indexName - index name
      Returns:
      true if index exists, false otherwise
    • getIndexMetadata

      public com.fasterxml.jackson.databind.node.ObjectNode getIndexMetadata(String indexName)
      Description copied from interface: IndexManager
      Requests info about index from server.
      Parameters:
      indexName - index name
      Returns:
      response as Json
    • putMapping

      public boolean putMapping(String indexName, IndexMappingConfiguration mappingConfiguration)
      Description copied from interface: IndexManager
      Saves mapping to index on the search server or servers cluster.
      Parameters:
      indexName - name of the index for saving mapping
      mappingConfiguration - mapping for saving to configuration of the specified index
      Returns:
      true if saving process was performed successfully.
    • buildMapping

      protected org.opensearch.client.opensearch._types.mapping.TypeMapping buildMapping(IndexConfiguration indexConfiguration)
    • buildSettings

      protected org.opensearch.client.opensearch.indices.IndexSettings buildSettings(IndexConfiguration indexConfiguration)