Class ElasticsearchIndexManager

java.lang.Object
io.jmix.search.index.impl.BaseIndexManager
io.jmix.searchelasticsearch.index.impl.ElasticsearchIndexManager
All Implemented Interfaces:
IndexManager

public class ElasticsearchIndexManager extends BaseIndexManager
Implementation for Elasticsearch
  • Field Details

    • client

      protected final co.elastic.clients.elasticsearch.ElasticsearchClient client
    • indexSettingsProcessor

      protected final ElasticsearchIndexSettingsProvider indexSettingsProcessor
  • 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
    • isIndexActual

      protected boolean isIndexActual(IndexConfiguration indexConfiguration)
      Specified by:
      isIndexActual in class BaseIndexManager
    • buildMapping

      protected co.elastic.clients.elasticsearch._types.mapping.TypeMapping buildMapping(IndexConfiguration indexConfiguration)
    • buildSettings

      protected co.elastic.clients.elasticsearch.indices.IndexSettings buildSettings(IndexConfiguration indexConfiguration)
    • toJsonNode

      protected com.fasterxml.jackson.databind.JsonNode toJsonNode(co.elastic.clients.json.JsonpSerializable object)
    • toObjectNode

      protected com.fasterxml.jackson.databind.node.ObjectNode toObjectNode(co.elastic.clients.json.JsonpSerializable object)
    • getIndexMetadataMapInternal

      protected Map<String,co.elastic.clients.elasticsearch.indices.IndexState> getIndexMetadataMapInternal(String indexName)
    • getIndexMetadataInternal

      @Nullable protected co.elastic.clients.elasticsearch.indices.IndexState getIndexMetadataInternal(String indexName)
    • isIndexMappingActual

      protected boolean isIndexMappingActual(IndexConfiguration indexConfiguration, co.elastic.clients.elasticsearch.indices.IndexState currentIndexState)
    • isIndexSettingsActual

      protected boolean isIndexSettingsActual(IndexConfiguration indexConfiguration, co.elastic.clients.elasticsearch.indices.IndexState currentIndexState)