AutocompleteSegment

data class AutocompleteSegment(val type: AutocompleteMatchType, val category: Category? = 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

Parameters

type

The type of entity detected.

category

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.

brand

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.

plainText

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

matchedAlternativeName

(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".

Constructors

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

Properties

Link copied to clipboard
val brand: Brand? = null
Link copied to clipboard
val category: Category? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard