Package com.algolia.model.search
Enum Class RemoveWordsIfNoResults
- All Implemented Interfaces:
Serializable
,Comparable<RemoveWordsIfNoResults>
,Constable
Strategy for removing words from the query when it doesn't return any results. This helps to
avoid returning empty search results. - `none`. No words are removed when a query doesn't return
results. - `lastWords`. Treat the last (then second to last, then third to last) word as
optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the
first (then second, then third) word as optional, until there are results or at most 5 words have
been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove
words to improve
results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic RemoveWordsIfNoResults
getValue()
toString()
static RemoveWordsIfNoResults
Returns the enum constant of this class with the specified name.static RemoveWordsIfNoResults[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
LAST_WORDS
-
FIRST_WORDS
-
ALL_OPTIONAL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-
toString
- Overrides:
toString
in classEnum<RemoveWordsIfNoResults>
-
fromValue
-