Skip to content

Commit 2c97142

Browse files
committed
New info for search 2026-01-01 BP.
1 parent 0fee51e commit 2c97142

1 file changed

Lines changed: 54 additions & 18 deletions

File tree

articles/azure-maps/how-to-use-best-practices-for-search.md

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ zone_pivot_groups: azure-maps-search
1717

1818
Azure Maps [Search service][Search service v1] includes API that offers various capabilities to help developers to search addresses, places, business listings by name or category, and other geographic information. For example, [Search Fuzzy] allows users to search for an address or Point of Interest (POI).
1919

20-
This article explains how to apply sound practices when you call data from Azure Maps Search service. You'll learn how to:
20+
This article explains how to apply sound practices when you call data from Azure Maps Search service. Learn how to:
2121
> [!div class="checklist"]
2222
>
2323
> * Build queries to return relevant matches
@@ -36,7 +36,7 @@ You can use any API development environment such as [Bruno] to run the HTTP requ
3636

3737
When you search for a full or partial address by using Azure Maps Search service, the API reads keywords from your search query. Then it returns the longitude and latitude coordinates of the address. This process is called *geocoding*.
3838

39-
The ability to geocode in a country/region depends on the availability of road data and the precision of the geocoding service. For more information about Azure Maps geocoding capabilities by country or region, see [Geocoding coverage].
39+
The ability to geocode in a country/region depends on the availability of road data and the precision of the geocoding service. For more information about Azure Maps geocoding capabilities by country/region, see [Geocoding coverage].
4040

4141
### Limit search results
4242

@@ -67,8 +67,8 @@ We recommend that you use [Search Fuzzy] when you don't know your user inputs fo
6767

6868
* `Addr` - **Address ranges**: Address points that are interpolated from the beginning and end of the street. These points are represented as address ranges.
6969
* `Geo` - **Geographies**: Administrative divisions of land. A geography can be a country/region, state, or city, for example.
70-
* `PAD` - **Point addresses**: Addresses that include a street name and number. Point addresses can be found in an index. An example is *Soquel Dr 2501*. A point address provides the highest level of accuracy available for addresses.
71-
* `POI` - **Points of interest**: Points on a map that are considered to be worth attention or that might be interesting. [Search Address] doesn't return POIs.
70+
* `PAD` - **Point addresses**: Addresses that include a street name and number. Point addresses can be found in an index. An example is *Soquel Dr 2501*. A point address provides the highest level of accuracy available for addresses.
71+
* `POI` - **Points of interest**: Points on a map that are considered to be worth attention or that might be interesting. [Search Address] doesn't return POIs.
7272
* `Str` - **Streets**: Streets on the map.
7373
* `XStr` - **Cross streets or intersections**: Junctions or places where two streets intersect.
7474

@@ -125,13 +125,13 @@ https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&subscrip
125125

126126
### Set the results language
127127

128-
Use the `language` parameter to set the language for the returned search results. If the request doesn't set the language, then by default Search service uses the most common language in the country or region. When no data is available in the specified language, the default language is used.
128+
Use the `language` parameter to set the language for the returned search results. If the request doesn't set the language, then by default Search service uses the most common language in the country/region. When no data is available in the specified language, the default language is used.
129129

130130
For more information, see [Azure Maps supported languages].
131131

132132
### Use predictive mode (automatic suggestions)
133133

134-
To find more matches for partial queries, set the `typeahead` parameter to `true`. This query is interpreted as a partial input, and the search enters predictive mode. If you don't set the `typeahead` parameter to `true`, then the service assumes that all relevant information has been passed in.
134+
To find more matches for partial queries, set the `typeahead` parameter to `true`. This query is interpreted as a partial input, and the search enters predictive mode. If you don't set the `typeahead` parameter to `true`, then the service assumes that all relevant information was passed in.
135135

136136
In the following sample query, the Search Address service is queried for *Microsoft*. Here, the `typeahead` parameter set to `true`. The response shows that the search service interpreted the query as partial query. The response contains results for an automatically suggested query.
137137

@@ -767,7 +767,7 @@ https://atlas.microsoft.com/search/address/json?subscription-key={Your-Azure-Map
767767

768768
* **Point Address**: Points on a map that have a specific address with a street name and number. Point Address provides the highest level of accuracy for addresses.
769769

770-
* **Address Range**: The range of address points that are interpolated from the beginning and end of the street.
770+
* **Address Range**: The range of address points that are interpolated from the beginning and end of the street.
771771

772772
* **Geography**: Areas on a map that represent administrative divisions of a land, for example, country/region, state, or city.
773773

@@ -785,7 +785,7 @@ Let's look at the response structure. In the response that follows, the types of
785785
* Street
786786
* Cross Street
787787

788-
Notice that the address search doesn't return POIs.
788+
Notice that the address search doesn't return POIs.
789789

790790
The `Score` parameter for each response object indicates how the matching score relates to the scores of other objects in the same response. For more information about response object parameters, see [Get Search Address].
791791

@@ -951,9 +951,9 @@ The `Score` parameter for each response object indicates how the matching score
951951

952952
### Geometry
953953

954-
A response type of *Geometry* can include the geometry ID that's returned in the `dataSources` object under `geometry` and `id`. For example, you can use the [Search Polygon service] to request the geometry data in a GeoJSON format. By using this format, you can get a city or airport outline for a set of entities. You can then use this boundary data to [Set up a geofence] or [Search POIs inside the geometry].
954+
A response type of *Geometry* can include the geometry ID returned in the `dataSources` object under `geometry` and `id`. For example, you can use the [Search Polygon service] to request the geometry data in a GeoJSON format. By using this format, you can get a city or airport outline for a set of entities. You can then use this boundary data to [Set up a geofence] or [Search POIs inside the geometry].
955955

956-
Responses for [Search Address] or the [Search Fuzzy] can include the geometry ID that's returned in the `dataSources` object under `geometry` and `id`:
956+
Responses for [Search Address] or the [Search Fuzzy] can include the geometry ID returned in the `dataSources` object under `geometry` and `id`:
957957

958958
```JSON
959959
"dataSources": {
@@ -990,7 +990,7 @@ You can use any API development environment such as [Bruno] to run the HTTP requ
990990

991991
### Task‑specific operations
992992

993-
Each Search capability is exposed through a dedicated API, such as [Get Geocoding], [Get Geocode Autocomplete], [Get Reverse Geocoding] or [Get Polygon]. This separation improves clarity, performance, and intent alignment.
993+
Each Search capability is exposed through a dedicated API, such as [Get Geocoding], [Get Geocode Autocomplete], [Get Reverse Geocoding], or [Get Polygon]. This separation improves clarity, performance, and intent alignment.
994994

995995
### Geographic relevance signals
996996

@@ -1022,10 +1022,10 @@ This section describes practical techniques to reduce low‑quality matches for
10221022

10231023
* Confidence (High, Medium, Low). For more information, see [ConfidenceEnum].
10241024
* Match codes (Good, Ambiguous, UpHierarchy). For more information, see [MatchCodesEnum].
1025-
* Result type (properties.type for example: Address, PopulatedPlace, RoadBlock, AdminDivision1). For more information, see [properties.type].
1025+
* Result type (`properties.type` for example: Address, PopulatedPlace, RoadBlock, AdminDivision1). For more information, see [properties.type].
10261026

10271027
> [!NOTE]
1028-
> `RoadBlock` is formally listed as a possible [properties.type] value and is also referenced in [match‑code][MatchCodesEnum] documentation as an example of an `UpHierarchy` fallback. Treat it as a signal that the service could not resolve the query to a more specific street‑level address.
1028+
> `RoadBlock` is formally listed as a possible [properties.type] value and is also referenced in [match‑code][MatchCodesEnum] documentation as an example of an `UpHierarchy` fallback. Treat it as a signal that the service couldn't resolve the query to a more specific street‑level address.
10291029
10301030
#### Prefer structured parameters when you know the address components
10311031

@@ -1068,22 +1068,22 @@ This reduces the likelihood of low-confidence matches in unrelated regions when
10681068

10691069
[Get Geocoding] returns multiple signals under features[].properties, including `confidence`, `matchCodes`, and `type`. Use these together rather than filtering by `confidence` alone.
10701070

1071-
##### Why confidence alone is not sufficient
1071+
##### Why confidence alone isn't sufficient
10721072

10731073
* **Medium** confidence can indicate a valid result when the query is ambiguous and there isn't enough context to rank one candidate over another.
10741074

1075-
* **Medium** confidence can also occur when the service returns a less precise match than requested, and sets the match code to UpHierarchy (for example, matching only a postal code when an address was requested).
1075+
* **Medium** confidence can also occur when the service returns a less precise match than requested, and sets the match code to `UpHierarchy` (for example, matching only a postal code when an address was requested).
10761076

10771077
##### Reworded clarity: how "up-hierarchy" results happen
10781078

1079-
When the service cannot find a match at the specificity implied by the query, it may "move up the geographic hierarchy" and return a broader location (for example, city, administrative division, or country/region). In those cases, matchCodes includes UpHierarchy, and properties.type indicates what level was actually returned.
1079+
When the service can't find a match at the specificity implied by the query, it may "move up the geographic hierarchy" and return a broader location (for example, city, administrative division, or country/region). In those cases, `matchCodes` includes `UpHierarchy`, and properties.type indicates what level was returned.
10801080

10811081
##### Practical filtering guidance (apply in this order)
10821082

10831083
1. **Reject low-quality matches for exact-search UX**
10841084
If `confidence` is Low, treat the result as not acceptable for an exact-match workflow.
10851085
1. **Detect up-hierarchy fallbacks**
1086-
If `matchCodes` includes `UpHierarchy`, the service could not match the requested granularity and returned a broader location. Use `type` to determine what level was returned (for example, `PopulatedPlace`, `AdminDivision1`, `CountryRegion`, or `RoadBlock`).
1086+
If `matchCodes` includes `UpHierarchy`, the service couldn't match the requested granularity and returned a broader location. Use `type` to determine what level was returned (for example, `PopulatedPlace`, `AdminDivision1`, `CountryRegion`, or `RoadBlock`).
10871087
1. **Validate the expected result type**
10881088
If your UX expects a street-level match, accept results only when type is sufficiently specific (for example, Address) and reject broader types (for example, `PopulatedPlace`). This prevents accepting a city/state fallback when the user intended a specific address.
10891089
1. **Handle ambiguity explicitly**
@@ -1092,6 +1092,40 @@ When the service cannot find a match at the specificity implied by the query, it
10921092
> [!TIP]
10931093
> Use [properties.type] to understand what was returned and [matchCodes][MatchCodesEnum] to understand how it was derived (for example, `UpHierarchy` fallback).
10941094
1095+
### Use geocoding as a data enrichment step
1096+
1097+
When geocoding large address datasets, expect that some records won't return results. This is normal and doesn't indicate a service error.
1098+
1099+
Common causes include:
1100+
1101+
* Misspellings or inconsistent formatting
1102+
* Incomplete addresses
1103+
* Interior details (for example, apartment, suite, or floor numbers) that aren't part of a deliverable address
1104+
1105+
Treat geocoding as a data enrichment process rather than a strict validation step:
1106+
1107+
* Submit addresses for geocoding.
1108+
* Identify records that aren't resolved.
1109+
* Flag unresolved addresses for review or normalization.
1110+
* Retry geocoding only after cleaning the source data.
1111+
1112+
Avoid attempting to force matches for low‑quality input, as this can introduce incorrect or misleading location data into downstream systems.
1113+
1114+
### Understand empty geocoding results
1115+
1116+
A geocoding request may return an HTTP 200 (OK) response with no results.
1117+
1118+
This indicates that the request was processed successfully, but no matching address or place was found. It doesn't represent a failure of the service.
1119+
1120+
Applications should handle empty results explicitly and avoid treating them as errors. In many scenarios, returning no result is preferable to returning a low‑confidence or incorrect match.
1121+
1122+
> [!NOTE]
1123+
> Azure Maps request limits, quotas, and throttling behavior are configured at the Azure subscription level.
1124+
> For information on pricing, usage limits, and monitoring, see:
1125+
>
1126+
> * [Azure Maps pricing]
1127+
> * [Understanding Azure Maps transactions]
1128+
10951129
## Best practices for autocomplete
10961130

10971131
Use [Get Geocode Autocomplete] for interactive user input scenarios.
@@ -1118,7 +1152,7 @@ Use [Get Reverse Geocoding] to translate coordinates into a human‑readable add
11181152
Recommendations:
11191153

11201154
* Prefer batch reverse geocoding for telemetry, tracking, or other high‑volume workloads.
1121-
* Cache results and avoid repeated calls for coordinates that do not change.
1155+
* Cache results and avoid repeated calls for coordinates that don't change.
11221156
* Validate coordinate order and precision to ensure accurate and consistent results.
11231157
* Expect approximate or partial addresses in some locations and handle these cases gracefully.
11241158

@@ -1240,3 +1274,5 @@ GET https://atlas.microsoft.com/polygon
12401274
[ConfidenceEnum]: /rest/api/maps/search/get-geocoding#confidenceenum
12411275
[MatchCodesEnum]: /rest/api/maps/search/get-geocoding#MatchCodesEnum
12421276
[properties.type]: /rest/api/maps/search/get-geocoding#properties
1277+
[Azure Maps pricing]: https://azure.microsoft.com/pricing/details/azure-maps
1278+
[Understanding Azure Maps transactions]: understanding-azure-maps-transactions.md

0 commit comments

Comments
 (0)