public class AutocompleteResult

The result returned by the autocomplete search.

An AutocompleteResult object includes an array of segments that correspond to recognized entities. These entities can be brand, poiCategory, or plainText.

When the query contains multiple recognized entities, a single autocomplete result may contain multiple segments. For instance, if a user enters the query “Chess Bis,” the autocomplete search result could include 2 segments: a plain text segment containing “Chess” and a category segment with “Bistro.”

Instances of this class are utilized as components of the Search.autocomplete(options:completion:) method, accessible through the AutocompleteResponse.results property.

  • The recognized entities present in the autocomplete result.

    This property holds an array of AutocompleteSegment objects, which can be brand, poiCategory, or plainText.

    For example the query “To” can return a list of autocomplete results where one result can have the category segment with the query “Tourist Attraction” and another one can have the brand segment with the query “TomTom”.



    public let segments: [AutocompleteSegment]