Class TypeAheadConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe number of autocomplete suggestions to return on a TypeAhead search.The name of this configuration.When highlighting, this is a string that will be prepended to a matching keyword.The fields to highlight.intThe approximate size, in characters, of fragments to consider for highlighting.When highlighting, this is a string that will be prepended to a matching keyword.getId()TheIndexableTypethis configuration belongs to.The phrase slop.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.voidvoidsetIndexableType(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.toString()
-
Constructor Details
-
TypeAheadConfiguration
public TypeAheadConfiguration()
-
-
Method Details
-
getId
-
getConfigName
The name of this configuration.- Returns:
- The configuration name.
-
getHighlightFields
The fields to highlight. These are the fields that we support autocomplete on.These fields must be searchable.
- Returns:
- The highlightable fields.
-
getIndexableType
TheIndexableTypethis configuration belongs to.- Returns:
- The IndexableType this configuration belongs to.
-
getAutocompleteSuggestionLimit
The number of autocomplete suggestions to return on a TypeAhead search.- Returns:
- The number of autocomplete suggestions to return.
-
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
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
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
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
-
setConfigName
The name of this configuration.- Parameters:
configName- The configuration name.
-
setHighlightFields
The fields to highlight. These are the fields that we support autocomplete on.These fields must be searchable.
- Parameters:
highlightFields- The highlightable fields.
-
setIndexableType
TheIndexableTypethis configuration belongs to.- Parameters:
indexableType- The IndexableType this configuration belongs to.
-
setAutocompleteSuggestionLimit
The number of autocomplete suggestions to return on a TypeAhead search.- Parameters:
autocompleteSuggestionLimit- The autocomplete suggestion limit.
-
setPhraseSlop
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
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
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.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-