AutocompleteSegment

@objcMembers
public class AutocompleteSegment : Codable

Describes entities detected in the result.

Important

This is a Public Preview API. It may be changed or removed at any time.

Public

  • The type of entity that has been detected. Entities that can be detected: category, brand, plaintext.

    Declaration

    Swift

    public let type: String
  • The value of the detected entity. It may be a category name, brand name, or a piece of unrecognized text.

    Declaration

    Swift

    public let value: String
  • Defines the mapping between the inputQuery and the segment

    Declaration

    Swift

    public let matches: AutocompleteMatches
  • id

    Category segment type. Can be used to restrict the results of other search endpoints to Points Of Interest (POIs) from specific categories.

    Declaration

    Swift

    public let id: String?
  • 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”.

    Declaration

    Swift

    public let matchedAlternativeName: String?