AutocompleteSegment

data class AutocompleteSegment(val type: AutocompleteMatchType, val poiCategory: PoiCategory? = null, val brand: Brand? = null, val plainText: String = "", val matchedAlternativeName: String = "")

Describes an entity found within the autocomplete search term. An entity is a distinct part of the search term that can be used to generate a query.

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

See also

https://developer.tomtom.com/search-api/search-api-documentation-search/fuzzy-search

Constructors

Link copied to clipboard
fun AutocompleteSegment(type: AutocompleteMatchType, poiCategory: PoiCategory? = null, brand: Brand? = null, plainText: String = "", matchedAlternativeName: String = "")

Properties

Link copied to clipboard
val brand: Brand? = null

The brand name. The Brand.name field can be used to restrict results of other search endpoints to Points Of Interest (POI) for specified brands. See the brandSet parameter in in fuzzy search API.

Link copied to clipboard

(Optional) category segment type. Present only if a part of the user query matches an alternative name instead of a primary name. For example, for the input query "petrol station" the category segment value is "gas station" and the matchedAlternativeName is "petrol station".

Link copied to clipboard

Plain text match. It is available only if match type is AutocompleteMatchType.PlainText

Link copied to clipboard

This is specific to category segment type. Can be used to restrict the results of other search endpoints to Points Of Interest (POI) from specific categories. See the categorySet parameter in fuzzy search API.

Link copied to clipboard

The type of entity detected.