Class ElasticsearchIndexService
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.ElasticsearchIndexService
This class aims to interact with Elasticsearch for any operation strict related to index management.
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIndexService(ElasticsearchHttpClientFactory elasticsearchHttpClientFactory, int fieldsLimit, int maxResultWindow) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCreates an index with the given name in the Elasticsearch server.booleanCheck if the given index exists.booleanThis method check if the basic mapping is loaded checking if a basic field mapping defined in resources/alfresco/search/elasticsearch/config/basicFields.json exists.
-
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
-