Class SynonymProperties

java.lang.Object
com.broadleafcommerce.search.core.service.SynonymProperties

@ConfigurationProperties("broadleaf.search.feature.synonym") public class SynonymProperties extends Object
Properties indicating what synonyms to load on application startup. This will only execute if there is no existing synonym data in Solr.
  • Constructor Details

    • SynonymProperties

      public SynonymProperties()
  • Method Details

    • getConfig

      The synonyms to load on startup.
    • getManagedLanguages

      public List<ManagedLanguage> getManagedLanguages()
      The managed languages that are available in the search engine for synonym management.
    • getRestrictedCharacters

      public Set<Character> getRestrictedCharacters()
      Restricted characters that are not allowed in synonyms. By default, this is all URL reserved characters.

      The primary reason for this is that there is a bug in the Solr managed resource API where it does not properly escape reserved characters. So if the synonym is "A/B", for example, it is impossible to manage that synonym through the API. If/when this bug is fixed, these properties can be removed.

    • isCaseSensitive

      public boolean isCaseSensitive()
      Solr's managed synonym API does not support case-insensitivity. By default, when synonyms are saved they are lower-cased. Setting this value to true disables that behavior and saves synonyms exactly as they are provided.
    • setConfig

      public void setConfig(List<SynonymProperties.LoadSynonymProperty> config)
      The synonyms to load on startup.
    • setManagedLanguages

      public void setManagedLanguages(List<ManagedLanguage> managedLanguages)
      The managed languages that are available in the search engine for synonym management.
    • setRestrictedCharacters

      public void setRestrictedCharacters(Set<Character> restrictedCharacters)
      Restricted characters that are not allowed in synonyms. By default, this is all URL reserved characters.

      The primary reason for this is that there is a bug in the Solr managed resource API where it does not properly escape reserved characters. So if the synonym is "A/B", for example, it is impossible to manage that synonym through the API. If/when this bug is fixed, these properties can be removed.

    • setCaseSensitive

      public void setCaseSensitive(boolean caseSensitive)
      Solr's managed synonym API does not support case-insensitivity. By default, when synonyms are saved they are lower-cased. Setting this value to true disables that behavior and saves synonyms exactly as they are provided.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object