Enum Class RemoveWordsIfNoResults

java.lang.Object
java.lang.Enum<RemoveWordsIfNoResults>
com.algolia.model.search.RemoveWordsIfNoResults
All Implemented Interfaces:
Serializable, Comparable<RemoveWordsIfNoResults>, Constable

public enum RemoveWordsIfNoResults extends Enum<RemoveWordsIfNoResults>
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/).
  • Enum Constant Details

  • Method Details

    • values

      public static RemoveWordsIfNoResults[] 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

      public static RemoveWordsIfNoResults valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<RemoveWordsIfNoResults>
    • fromValue

      public static RemoveWordsIfNoResults fromValue(String value)