Class TypeAheadConfiguration
- java.lang.Object
-
- com.broadleafcommerce.search.api.domain.TypeAheadConfiguration
-
public class TypeAheadConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description TypeAheadConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)IntegergetAutocompleteSuggestionLimit()The number of autocomplete suggestions to return on a TypeAhead search.StringgetConfigName()The name of this configuration.StringgetHighlightAppend()When highlighting, this is a string that will be prepended to a matching keyword.List<SuggestionField>getHighlightFields()The fields to highlight.intgetHighlightFragmentSize()The approximate size, in characters, of fragments to consider for highlighting.StringgetHighlightPrepend()When highlighting, this is a string that will be prepended to a matching keyword.StringgetId()StringgetIndexableType()TheIndexableTypethis configuration belongs to.StringgetPhraseSlop()The phrase slop.List<TypeAheadSuggestionConfiguration>getTypeAheadSuggestionConfigurations()Configurations defining what should be returned on a TypeAhead query.inthashCode()voidsetAutocompleteSuggestionLimit(Integer autocompleteSuggestionLimit)The number of autocomplete suggestions to return on a TypeAhead search.voidsetConfigName(String configName)The name of this configuration.voidsetHighlightAppend(String highlightAppend)When highlighting, this is a string that will be prepended to a matching keyword.voidsetHighlightFields(List<SuggestionField> highlightFields)The fields to highlight.voidsetHighlightFragmentSize(int highlightFragmentSize)The approximate size, in characters, of fragments to consider for highlighting.voidsetHighlightPrepend(String highlightPrepend)When highlighting, this is a string that will be prepended to a matching keyword.voidsetId(String id)voidsetIndexableType(String indexableType)TheIndexableTypethis configuration belongs to.voidsetPhraseSlop(String phraseSlop)The phrase slop.voidsetTypeAheadSuggestionConfigurations(List<TypeAheadSuggestionConfiguration> typeAheadSuggestionConfigurations)Configurations defining what should be returned on a TypeAhead query.StringtoString()
-
-
-
Method Detail
-
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()
TheIndexableTypethis 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
highlightPrependis the string "<strong>", andhighlightAppendis "</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
highlightPrependis the string "<strong>", andhighlightAppendis "</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)
TheIndexableTypethis 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
highlightPrependis the string "<strong>", andhighlightAppendis "</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
highlightPrependis the string "<strong>", andhighlightAppendis "</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.
-
canEqual
protected boolean canEqual(Object other)
-
-