AutocompleteSegment
@objcMembers
public class AutocompleteSegment
Describes entities detected in the result.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a segment that matches autocomplete request.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
required public init( type: AutocompleteMatchType, value: String, matches: AutocompleteMatches, poiCategory: PoiCategory?, matchedAlternativeName: String? )Parameters
typespecifies type of the match (e.g. “category”, “brand”).
valuespecifies the matching name.
matchesthe matches for the autocomplete request.
poiCategorya poi category for the given segment.
matchedAlternativeNamean alternative name fo the match.
-
The type of entity that has been detected
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let type: AutocompleteMatchType -
The value of the detected entity. It may be a category name, brand name, or a piece of unrecognized text.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let value: String -
Defines the mapping between the inputQuery and the segment
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let matches: AutocompleteMatches -
POI Category for the given segment. Can be used to restrict the results of other search endpoints to Points Of Interest (POIs) from specific categories.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let poiCategory: PoiCategory? -
Optional category segment type. Only used if a part of the user query matches the alternative name instead of a primary name. For example, for the input query “petrol station” the category segment value will be “gas station” and the matchedAlternativeName will be “petrol station”.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let matchedAlternativeName: String?
AutocompleteSegment Class Reference