Class ElasticsearchIndexManager

java.lang.Object
io.jmix.search.index.impl.BaseIndexManager<co.elastic.clients.elasticsearch.indices.IndexState,co.elastic.clients.elasticsearch.indices.IndexSettings,co.elastic.clients.json.JsonpSerializable>
io.jmix.searchelasticsearch.index.impl.ElasticsearchIndexManager
All Implemented Interfaces:
IndexManager

public class ElasticsearchIndexManager extends BaseIndexManager<co.elastic.clients.elasticsearch.indices.IndexState,co.elastic.clients.elasticsearch.indices.IndexSettings,co.elastic.clients.json.JsonpSerializable>
Implementation for Elasticsearch
  • Field Details

  • 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 mapping)
      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
      mapping - mapping for saving to configuration of the specified index
      Returns:
      true if saving process was performed successfully.
    • buildMapping

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

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