Class ContentModelSynchronizer
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.ContentModelSynchronizer
The entry point for the Content Model synchronization
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionContentModelSynchronizer(FieldMappingBuilder elasticsearchFieldBuilder, ElasticsearchHttpClientFactory clientFactory, String indexLocale, IndexConfigurationInitializer indexConfigurationInitializer) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the given index has the supported mandatory analyzers loaded.booleanbooleanLoads supported analyzers on startup if they do not exist already.voidsetCustomAnalyzerConfigFiles(org.springframework.core.io.Resource[] customAnalyzerConfigFiles)
-
Constructor Details
-
ContentModelSynchronizer
public ContentModelSynchronizer(FieldMappingBuilder elasticsearchFieldBuilder, ElasticsearchHttpClientFactory clientFactory, String indexLocale, IndexConfigurationInitializer indexConfigurationInitializer)
-
-
Method Details
-
loadSupportedAnalyzersOnStartup
public boolean loadSupportedAnalyzersOnStartup()Loads supported analyzers on startup if they do not exist already.- Returns:
- true on success false if the configured settings are invalid in case there is a problem sending the request or parsing back the response log IOException
-
areSupportedAnalyzersLoaded
public boolean areSupportedAnalyzersLoaded()Check if the given index has the supported mandatory analyzers loaded.- Returns:
- true if the mandatory analyzers are loaded.
-
loadBasicIndexMappingsOnStartup
public boolean loadBasicIndexMappingsOnStartup() -
initializeElasticsearchIndexMappings
public ContentModelSynchronizer.IndexMappingResult initializeElasticsearchIndexMappings(Collection<PropertyDefinition> properties) throws IOException - Parameters:
properties- properties to send to Elasticsearch- Returns:
- number of the successfully updated properties. If the mapping acknowledge fails the method will returns -1
- Throws:
IOException- if it fails to execute mapping request.
-
setCustomAnalyzerConfigFiles
public void setCustomAnalyzerConfigFiles(org.springframework.core.io.Resource[] customAnalyzerConfigFiles)
-