Share via


MapsSearchClient.FuzzySearchAsync Method

Definition

The basic default API is Free Form Search which handles the most fuzzy of inputs handling any combination of address or POI tokens. This search API is the canonical 'single line search'. The Free Form Search API is a seamless combination of POI search and geocoding. The API can also be weighted with a contextual position (lat./lon. pair), or fully constrained by a a pair of coordinates and radius, or it can be executed more generally without any geo biasing anchor point.<br><br>We strongly advise you to use the 'countrySet' parameter to specify only the countries for which your application needs coverage, as the default behavior will be to search the entire world, potentially returning unnecessary results.<br><br> E.g.: countrySet=US,FR <br><br>Please see Search Coverage for a complete list of all the supported countries.<br><br>Most Search queries default to maxFuzzyLevel=2 to gain performance and also reduce unusual results. This new default can be overridden as needed per request by passing in the query param maxFuzzyLevel=3 or 4.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>> FuzzySearchAsync (string query, Azure.Maps.Search.FuzzySearchOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member FuzzySearchAsync : string * Azure.Maps.Search.FuzzySearchOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>>
override this.FuzzySearchAsync : string * Azure.Maps.Search.FuzzySearchOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Maps.Search.Models.SearchAddressResult>>
Public Overridable Function FuzzySearchAsync (query As String, Optional options As FuzzySearchOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SearchAddressResult))

Parameters

query
String

The POI name to search for (e.g., "statue of liberty", "starbucks"), must be properly URL encoded.

options
FuzzySearchOptions

additional options

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Remarks

Free Form Search

Applies to