sdk-search / com.tomtom.online.sdk.search.data.fuzzy / FuzzySearchQueryBuilder

FuzzySearchQueryBuilder

class FuzzySearchQueryBuilder : IFuzzySearchQuery

Builder class used to create FuzzySearchQuery.

Constructors

<init>

FuzzySearchQueryBuilder(term: String)

Builder class used to create FuzzySearchQuery.

Functions

build

fun build(): FuzzySearchQuery

Creates new instance of FuzzySearchQuery

withBoundingBox

fun withBoundingBox(boundingBox: BoundingBox): FuzzySearchQueryBuilder

The bounding box for the search. NOTE: Point-Radius parameters and bounding box parameters are mutually exclusive. Point-Radius parameters take precendence when both are passed in.

withBrandSet

fun withBrandSet(brandSet: String): FuzzySearchQueryBuilder

A comma-separated list of brand names which could be used to restrict the result to Points Of Interest of specific brands.

withCategory

fun withCategory(category: Boolean): FuzzySearchQueryBuilder

If your search use case only requires POI results filtered by category, you may use the Category endpoint.

withCategorySet

fun withCategorySet(categorySet: List<Long>): FuzzySearchQueryBuilder

Restricts the POIs in the Response to those whose id is listed in the categorySet.

withCountry

fun withCountry(country: String): FuzzySearchQueryBuilder

A comma-separated string of country codes (e.g., FR,ES). This will limit the search to the specified countries.

withEVConnectorSetFilter

fun withEVConnectorSetFilter(EVConnectorSetFilter: String): FuzzySearchQueryBuilder

A comma-separated list of connector types which could be used to restrict the result to Points Of Interest of type Electric Vehicle Station, supporting specific connector types.

withExtendedPostalCodes

fun withExtendedPostalCodes(extendedPostalCodes: String): FuzzySearchQueryBuilder

Indexes for which extended postal codes should be included in the results. Available indexes are: Addr, Geo, PAD, POI, Str, XStr. The value should be a comma-separated list of index types (in any order), or "None" for no indexes, i.e., "PAD,Addr,POI".

withFuelSet

fun withFuelSet(fuelSet: String): FuzzySearchQueryBuilder

A comma-separated list of fuel types which could be used to restrict the result to Points Of Interest of specific fuels.

withGeopoliticalView

fun withGeopoliticalView(geopoliticalView: String): FuzzySearchQueryBuilder

Defines what kind of geopolitical view should be used.

withIdx

fun withIdx(idx: String): FuzzySearchQueryBuilder

A comma-separated list of indexes which should be utilized for the search. Item order does not matter. Available indexes are: Addr, Geo, PAD, POI, Str, Xstr, i.e., "PAD,Addr".

withLanguage

fun withLanguage(language: String): FuzzySearchQueryBuilder

The language in which search results should be returned. Should be one of the supported IETF language tags, case insensitive. When data in the specified language is not available for a specific field, the default langauge is used.

withLimit

fun withLimit(limit: Int): FuzzySearchQueryBuilder

The upper limit of the number of results.

withMapCodes

fun withMapCodes(mapCodes: Set<MapCodeType>): FuzzySearchQueryBuilder

Enables the return of mapcodes.

withMaxFuzzyLevel

fun withMaxFuzzyLevel(maxFuzzyLevel: Int): FuzzySearchQueryBuilder

The maximum fuzzyness level to be used. The default value is 2. The maximum value is 4.

withMinFuzzyLevel

fun withMinFuzzyLevel(minFuzzyLevel: Int): FuzzySearchQueryBuilder

The minimum fuzzyness level to be used. The default value is 1. The maximum value is 4.

withOffset

fun withOffset(offset: Int): FuzzySearchQueryBuilder

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

withOpeningHours

fun withOpeningHours(openingHours: OpeningHoursMode): FuzzySearchQueryBuilder

When used includes a list of opening hours for a POI (Points of Interest).

withPosition

fun withPosition(position: LatLng): FuzzySearchQueryBuilder

The position where results should be biased. Supplying the position without a radius will only bias the search results to that area.

withPreciseness

fun withPreciseness(preciseness: LatLngAcc): FuzzySearchQueryBuilder

The position where results should be biased. The radius parameter is specified in meters. If radius and position are set, the results will be constrained to the defined area. If radius is not present, or is set to 0, the results will not be constrained.

withRelatedPois

fun withRelatedPois(relatedPois: PoiRelationType): FuzzySearchQueryBuilder

Enables the return of related POIs.

withTimeZone

fun withTimeZone(timeZone: TimeZoneType): FuzzySearchQueryBuilder

When used includes POIs' time zones.

withTypeAhead

fun withTypeAhead(typeAhead: Boolean): FuzzySearchQueryBuilder

If the "typeahead" flag is set, the query will be interpreted as a partial input and the search will enter predictive mode.

Companion Object Functions

create

fun create(term: String): FuzzySearchQueryBuilder

Builder used to create an instance of FuzzySearchQuery, once constructed, the user cannot change the field values