Class TypeAheadConfiguration

java.lang.Object
com.broadleafcommerce.search.api.domain.TypeAheadConfiguration

public class TypeAheadConfiguration extends Object
  • Constructor Details

    • TypeAheadConfiguration

      public TypeAheadConfiguration()
  • Method Details

    • getId

      public String getId()
    • getConfigName

      public String getConfigName()
      The name of this configuration.
      Returns:
      The configuration name.
    • getHighlightFields

      public List<SuggestionField> getHighlightFields()
      The fields to highlight. These are the fields that we support autocomplete on.

      These fields must be searchable.

      Returns:
      The highlightable fields.
    • getIndexableType

      public String getIndexableType()
      The IndexableType this configuration belongs to.
      Returns:
      The IndexableType this configuration belongs to.
    • getAutocompleteSuggestionLimit

      public Integer getAutocompleteSuggestionLimit()
      The number of autocomplete suggestions to return on a TypeAhead search.
      Returns:
      The number of autocomplete suggestions to return.
    • getPhraseSlop

      public String getPhraseSlop()

      The phrase slop. This allows matches of a phrase that is N distance away from a match.

      For example, consider the term "Red Wicker Basket". With a phrase slop of 2, this would allow "Red Basket" to match this term, as it is two words away.

      Returns:
      The phrase proximity
    • getHighlightPrepend

      public String getHighlightPrepend()

      When highlighting, this is a string that will be prepended to a matching keyword.

      For example, a query of 'bla' may match 'black'. If highlightPrepend is the string "<strong>", and highlightAppend is "</strong>" the result would be wrapped as follows:

           
           <strong>black</strong>
       
      Returns:
      The highlighting prepend value.
    • getHighlightAppend

      public String getHighlightAppend()

      When highlighting, this is a string that will be prepended to a matching keyword.

      For example, a query of 'bla' may match 'black'. If highlightPrepend is the string "<strong>", and highlightAppend is "</strong>" the result would be wrapped as follows:

           <strong>black</strong>
       
      Returns:
      The highlighting append value.
    • getHighlightFragmentSize

      public int getHighlightFragmentSize()
      The approximate size, in characters, of fragments to consider for highlighting.
      Returns:
      The fragment size.
    • getTypeAheadSuggestionConfigurations

      public List<TypeAheadSuggestionConfiguration> getTypeAheadSuggestionConfigurations()
      Configurations defining what should be returned on a TypeAhead query. This might represent a list of recommended products, categories, etc.
      Returns:
      The suggestion configurations.
    • setId

      public void setId(String id)
    • setConfigName

      public void setConfigName(String configName)
      The name of this configuration.
      Parameters:
      configName - The configuration name.
    • setHighlightFields

      public void setHighlightFields(List<SuggestionField> highlightFields)
      The fields to highlight. These are the fields that we support autocomplete on.

      These fields must be searchable.

      Parameters:
      highlightFields - The highlightable fields.
    • setIndexableType

      public void setIndexableType(String indexableType)
      The IndexableType this configuration belongs to.
      Parameters:
      indexableType - The IndexableType this configuration belongs to.
    • setAutocompleteSuggestionLimit

      public void setAutocompleteSuggestionLimit(Integer autocompleteSuggestionLimit)
      The number of autocomplete suggestions to return on a TypeAhead search.
      Parameters:
      autocompleteSuggestionLimit - The autocomplete suggestion limit.
    • setPhraseSlop

      public void setPhraseSlop(String phraseSlop)

      The phrase slop. This allows matches of a phrase that is N distance away from a match.

      For example, consider the term "Red Wicker Basket". With a phrase slop of 2, this would allow "Red Basket" to match this term, as it is two words away.

      Parameters:
      phraseSlop - The phrase proximity
    • setHighlightPrepend

      public void setHighlightPrepend(String highlightPrepend)

      When highlighting, this is a string that will be prepended to a matching keyword.

      For example, a query of 'bla' may match 'black'. If highlightPrepend is the string "<strong>", and highlightAppend is "</strong>" the result would be wrapped as follows:

           
           <strong>black</strong>
       
      Parameters:
      highlightPrepend - The value prepending to a highlighted field.
    • setHighlightAppend

      public void setHighlightAppend(String highlightAppend)

      When highlighting, this is a string that will be prepended to a matching keyword.

      For example, a query of 'bla' may match 'black'. If highlightPrepend is the string "<strong>", and highlightAppend is "</strong>" the result would be wrapped as follows:

           <strong>black</strong>
       
      Parameters:
      highlightAppend - The value appended to a highlighted field.
    • setHighlightFragmentSize

      public void setHighlightFragmentSize(int highlightFragmentSize)
      The approximate size, in characters, of fragments to consider for highlighting.
      Parameters:
      highlightFragmentSize - The desired fragment size.
    • setTypeAheadSuggestionConfigurations

      public void setTypeAheadSuggestionConfigurations(List<TypeAheadSuggestionConfiguration> typeAheadSuggestionConfigurations)
      Configurations defining what should be returned on a TypeAhead query. This might represent a list of recommended products, categories, etc.
      Parameters:
      typeAheadSuggestionConfigurations - The suggestion configurations.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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