Class IndexConfigurationInitializer
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.IndexConfigurationInitializer
Allows to load and cache ElasticSearch index configuration from a JSON file, and to verify if properties are indexed or tokenized.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPropertyIndexed(String propertyName) Verifies if property is specified in index configuration.booleanisPropertyTokenized(String propertyName) Verifies basing on index configuration if property is tokenized.Loads Elasticsearch index configuration in JSON format.
-
Constructor Details
-
IndexConfigurationInitializer
public IndexConfigurationInitializer()
-
-
Method Details
-
loadConfigurationAsInputStream
Loads Elasticsearch index configuration in JSON format.- Returns:
- an
InputStreamto the index configuration in JSON format - Throws:
IOException- if the configuration is not readable
-
isPropertyIndexed
Verifies if property is specified in index configuration.- Parameters:
propertyName- - property name- Returns:
- true if property is present in configuration file
-
isPropertyTokenized
Verifies basing on index configuration if property is tokenized.- Parameters:
propertyName- - property name- Returns:
- true if property is tokenized
-