RemoveWordsIfNoResults

public enum RemoveWordsIfNoResults : String

Applicable values for the removeWordsIfNoResults parameter.

  • No specific processing is done when a query does not return any result.

    Warning

    Beware of confusion with Optional.none when using type inference!

    Declaration

    Swift

    case none = "none"
  • When a query does not return any result, the last word will be added as optionalWords (the process is repeated with the n-1 word, n-2 word, … until there is results). This option is particularly useful on e-commerce websites.

    Declaration

    Swift

    case lastWords = "lastWords"
  • When a query does not return any result, the first word will be added as optionalWords (the process is repeated with the second word, third word, … until there is results). This option is useful on address search.

    Declaration

    Swift

    case firstWords = "firstWords"
  • When a query does not return any result, a second trial will be made with all words as optional (which is equivalent to transforming the AND operand between query terms in a OR operand)

    Declaration

    Swift

    case allOptional = "allOptional"