SearchOptions

public struct SearchOptions : Hashable

Encapsulates options that control the behavior of search and suggest operations.

  • The preferred language of the result. When unset or unsupported language is chosen, results will be returned in their local language.

    Declaration

    Swift

    public var languageCode: LanguageCode?
  • The maximum number of items in the response. It should be in the range [1, 100]. When not set, results will be limited to 20. For location search (reverse geocode) by default results limited to 1.

    Declaration

    Swift

    public var maxItems: Int32?
  • Allows enabling high density encoding of relevant parameters. For now, it only affects input parameters of type GeoCorridor. Only supported for search in SearchEngine, otherwise it is ignored. Note: This is a closed-alpha release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process. Only participants of the closed-alpha group can get access from HERE to use this feature, otherwise, a SearchError.forbidden will be propagated in callbacks.

    Declaration

    Swift

    public var highDensityEncodingEnabled: Bool
  • Flag to indicate if along the route search algorithm should produce well-distributed results. Pay attention, that parallelization is used. This feature is only supported for searchByCategory when CategoryQuery.Area.corridorArea and for searchByText when TextQuery.Area.corridorArea is provided in OfflineSearchEngine.

    Declaration

    Swift

    public var distributedResults: Bool
  • Creates an Options object. If no parameters are passed, uses default values (see fields description).

    Declaration

    Swift

    public init(languageCode: LanguageCode? = nil, maxItems: Int32? = nil, highDensityEncodingEnabled: Bool = false, distributedResults: Bool = false)