Class ElasticsearchIndexService

java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.ElasticsearchIndexService

public class ElasticsearchIndexService extends Object
This class aims to interact with Elasticsearch for any operation strict related to index management.
  • Constructor Details

    • ElasticsearchIndexService

      public ElasticsearchIndexService(ElasticsearchHttpClientFactory elasticsearchHttpClientFactory, int fieldsLimit, int maxResultWindow)
  • Method Details

    • indexExists

      public boolean indexExists()
      Check if the given index exists.
      Returns:
      true if the index is found.
    • createIndex

      public boolean createIndex()
      Creates an index with the given name in the Elasticsearch server.
      Returns:
      true if the index exists after the call.
    • isMappingLoaded

      public boolean isMappingLoaded()
      This method check if the basic mapping is loaded checking if a basic field mapping defined in resources/alfresco/search/elasticsearch/config/basicFields.json exists.
      Returns:
      true if mapping exists, false otherwise