SearchOptions

data class SearchOptions(    val query: String = "",     @IntRange(from = 1, to = 100) val limit: Int = 10,     @IntRange(from = 0, to = 1900) val offset: Int = 0,     val countryCodes: Set<String> = emptySet(),     val geoBias: GeoCoordinate? = null,     @Size(min = 0, max = 50) val searchAreas: Set<Geometry> = emptySet(),     val locale: Locale? = null,     @IntRange(from = 1, to = 4) val fuzzyLevel: Int = 2,     val resultTypes: Set<ResultType> = emptySet(),     val categoryIds: Set<CategoryId> = emptySet(),     val brands: Set<Brand> = emptySet(),     val connectors: Set<ConnectorType> = emptySet(),     val minPowerKW: Double? = null,     val maxPowerKW: Double? = null,     val fuelTypes: Set<FuelType> = emptySet(),     val geoPoliticalView: GeoPoliticalView? = null,     val openingHoursMode: OpeningHoursMode? = null,     val sessionId: String = "")

Defines the parameters of a Fuzzy Search.

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

Parameters

query

The search query.

limit

The maximum number of search results that will be returned.

offset

The starting offset of the returned results within the full result set.

countryCodes

A set of ISO 3166-1 alpha3 country codes. (e.g., FRA,ESP). This will limit the search to the specified countries.

geoBias

The GeoCoordinate position where results should be biased.

searchAreas

The geographic filter for search, all search results returned are confined in the specified geography. Max number of geometries is 50. Three types of geometries can be passed as searchAreas: CircleGeometry, RectangleGeometry and PolygonGeometry is ignored when PolygonGeometry is set or multiple search areas are set. When a single СircleGeometry or RectangleGeometry is set, geoBias is supported. СircleGeometry center overrides geoBias.

locale

The language in which search results should be returned. If not specified, language is set to the default official language of the location of the result.

fuzzyLevel

The fuzziness level to be used. When missing the implementation uses a default fuzzy search level of 2. The maximum value is 4.

resultTypes

A set of ResultType which should be used for the search. An empty set implies search can return results of any type.

categoryIds

Restricts the Points Of Interest in the response to those whose ID is listed.

brands

A list of brand names (case sensitive) used to restrict the result.

connectors

A list of connector types used to restrict the result to Points Of Interest of type Electric Vehicle Station, supporting specific connector types. See https://developer.tomtom.com/search-api/search-api-documentation/supported-connector-types for more details.

minPowerKW

A double value representing the power rate in kilowatts, used to restrict the result to the Points Of Interest of type Electric Vehicle Station supporting at least one connector with at that minimum power value (in kilowatts).

maxPowerKW

A double value representing the power rate in kilowatts, used to restrict the result to the Points Of Interest of type Electric Vehicle Station supporting at least one connector with that maximum power value (in kilowatts).

fuelTypes

A set of a FuelType used to restrict the result to Points Of Interest with those specific fuels.

geoPoliticalView

Defines what kind of geopolitical view should be used.

openingHoursMode

The opening hours scope. If it's not provided, no data about opening hours will be returned.

sessionId

A search session is a user session during which a user performs multiple search requests to find a specific address ot point of interest. This is needed for sending feedback to the online search.

Constructors

Link copied to clipboard
fun SearchOptions(    query: String = "",     @IntRange(from = 1, to = 100) limit: Int = 10,     @IntRange(from = 0, to = 1900) offset: Int = 0,     countryCodes: Set<String> = emptySet(),     geoBias: GeoCoordinate? = null,     @Size(min = 0, max = 50) searchAreas: Set<Geometry> = emptySet(),     locale: Locale? = null,     @IntRange(from = 1, to = 4) fuzzyLevel: Int = 2,     resultTypes: Set<ResultType> = emptySet(),     categoryIds: Set<CategoryId> = emptySet(),     brands: Set<Brand> = emptySet(),     connectors: Set<ConnectorType> = emptySet(),     minPowerKW: Double? = null,     maxPowerKW: Double? = null,     fuelTypes: Set<FuelType> = emptySet(),     geoPoliticalView: GeoPoliticalView? = null,     openingHoursMode: OpeningHoursMode? = null,     sessionId: String = "")

Properties

Link copied to clipboard
val brands: Set<Brand>
Link copied to clipboard
val categoryIds: Set<CategoryId>
Link copied to clipboard
val connectors: Set<ConnectorType>
Link copied to clipboard
val countryCodes: Set<String>
Link copied to clipboard
val fuelTypes: Set<FuelType>
Link copied to clipboard
val fuzzyLevel: Int = 2
Link copied to clipboard
val geoBias: GeoCoordinate? = null
Link copied to clipboard
val geoPoliticalView: GeoPoliticalView? = null
Link copied to clipboard
val limit: Int = 10
Link copied to clipboard
val locale: Locale? = null
Link copied to clipboard
val maxPowerKW: Double? = null
Link copied to clipboard
val minPowerKW: Double? = null
Link copied to clipboard
val offset: Int = 0
Link copied to clipboard
val openingHoursMode: OpeningHoursMode? = null
Link copied to clipboard
val query: String
Link copied to clipboard
val resultTypes: Set<ResultType>
Link copied to clipboard
val searchAreas: Set<Geometry>
Link copied to clipboard
val sessionId: String