Class IndexConfigurationInitializer

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

public class IndexConfigurationInitializer extends Object
Allows to load and cache ElasticSearch index configuration from a JSON file, and to verify if properties are indexed or tokenized.
  • Constructor Details

    • IndexConfigurationInitializer

      public IndexConfigurationInitializer()
  • Method Details

    • loadConfigurationAsInputStream

      public InputStream loadConfigurationAsInputStream() throws IOException
      Loads Elasticsearch index configuration in JSON format.
      Returns:
      an InputStream to the index configuration in JSON format
      Throws:
      IOException - if the configuration is not readable
    • isPropertyIndexed

      public boolean isPropertyIndexed(String propertyName)
      Verifies if property is specified in index configuration.
      Parameters:
      propertyName - - property name
      Returns:
      true if property is present in configuration file
    • isPropertyTokenized

      public boolean isPropertyTokenized(String propertyName)
      Verifies basing on index configuration if property is tokenized.
      Parameters:
      propertyName - - property name
      Returns:
      true if property is tokenized