Class TypeAheadConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The 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.int
The 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()
TheIndexableType
this configuration belongs to.The phrase slop.Configurations defining what should be returned on a TypeAhead query.int
hashCode()
void
setAutocompleteSuggestionLimit
(Integer autocompleteSuggestionLimit) The number of autocomplete suggestions to return on a TypeAhead search.void
setConfigName
(String configName) The name of this configuration.void
setHighlightAppend
(String highlightAppend) When highlighting, this is a string that will be prepended to a matching keyword.void
setHighlightFields
(List<SuggestionField> highlightFields) The fields to highlight.void
setHighlightFragmentSize
(int highlightFragmentSize) The approximate size, in characters, of fragments to consider for highlighting.void
setHighlightPrepend
(String highlightPrepend) When highlighting, this is a string that will be prepended to a matching keyword.void
void
setIndexableType
(String indexableType) TheIndexableType
this configuration belongs to.void
setPhraseSlop
(String phraseSlop) The phrase slop.void
setTypeAheadSuggestionConfigurations
(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
TheIndexableType
this 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
highlightPrepend
is the string "<strong>", andhighlightAppend
is "</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
highlightPrepend
is the string "<strong>", andhighlightAppend
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
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
TheIndexableType
this 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
highlightPrepend
is the string "<strong>", andhighlightAppend
is "</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
highlightPrepend
is the string "<strong>", andhighlightAppend
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
-
equals
-
canEqual
-
hashCode
public int hashCode()
-