Skip to content

Commit bc43c7e

Browse files
authored
Merge pull request #102615 from farah-alyasari/report8
Report8
2 parents ee04925 + cc7940e commit bc43c7e

File tree

2 files changed

+24
-154
lines changed

2 files changed

+24
-154
lines changed

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

Lines changed: 9 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Search efficiently using the Azure Maps Search Service | Microsoft Azure Maps
3-
description: Learn how to apply best practices for the Search service using Microsoft Azure Maps
3+
description: Learn how to apply best practices for the Search service using Microsoft Azure Maps
4+
45
author: walsehgal
56
ms.author: v-musehg
67
ms.date: 01/23/2020
@@ -36,7 +37,7 @@ See [geocoding coverage](https://docs.microsoft.com/azure/azure-maps/geocoding-c
3637

3738
### Limit search results
3839

39-
Azure Maps Search API can help you limit search results appropriately, so you can display relevant data to your users.
40+
Azure Maps Search API can help you limit search results appropriately, so you can display relevant data to your users.
4041

4142
> [!Note]
4243
> Not all of the search APIs supported parameters are listed below
@@ -54,9 +55,9 @@ See [geocoding coverage](https://docs.microsoft.com/azure/azure-maps/geocoding-c
5455

5556
**Fuzzy search parameters**
5657

57-
Azure Maps [Fuzzy Search API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) is the recommended service to use when you don't know what your user inputs are for a search query. The API combines Point of Interest (POI) search and geocoding into a canonical *single-line search*.
58+
Azure Maps [Fuzzy Search API](https://docs.microsoft.com/rest/api/maps/search/getsearchfuzzy) is the recommended service to use when you don't know what your user inputs are for a search query. The API combines Point of Interest (POI) search and geocoding into a canonical *single-line search*.
5859

59-
1. The `minFuzzyLevel` and `maxFuzzyLevel` help return relevant matches even when query parameters do not match exactly to the wanted information. To gain performance and reduce unusual results, default search queries to `minFuzzyLevel=1` and `maxFuzzyLevel=2` . Take an example of a search term "restrant", it is matched to "restaurant" when the `maxFuzzyLevel` is set to be 2. The default fuzzy levels can be overridden as needed.
60+
1. The `minFuzzyLevel` and `maxFuzzyLevel` help return relevant matches even when query parameters do not match exactly to the wanted information. To gain performance and reduce unusual results, default search queries to `minFuzzyLevel=1` and `maxFuzzyLevel=2` . Take an example of a search term "restrant", it is matched to "restaurant" when the `maxFuzzyLevel` is set to be 2. The default fuzzy levels can be overridden as needed.
6061

6162
2. You can also prioritize the exact set of result types to be returned by using the `idxSet` parameter. For this purpose, you can submit a comma-separated list of indexes; the item order does not matter. The following indexes are supported:
6263

@@ -76,7 +77,7 @@ See [geocoding coverage](https://docs.microsoft.com/azure/azure-maps/geocoding-c
7677

7778
### Reverse geocode and geography entity type filter
7879

79-
When doing a reverse geocode search with [Search Address Reverse API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse), the service has capability to return polygons for the administrative areas. By providing the parameter `entityType` in the request, you can narrow the search for specified geography entity types. The resulting response will contain the geography ID and the entity type matched. If you provide more than one entity, endpoint will return the **smallest entity available**. Returned Geometry ID can be used to get the geometry of that geography via [Get Polygon service](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon).
80+
When doing a reverse geocode search with [Search Address Reverse API](https://docs.microsoft.com/rest/api/maps/search/getsearchaddressreverse), the service has capability to return polygons for the administrative areas. By providing the parameter `entityType` in the request, you can narrow the search for specified geography entity types. The resulting response will contain the geography ID and the entity type matched. If you provide more than one entity, endpoint will return the **smallest entity available**. Returned Geometry ID can be used to get the geometry of that geography via [Get Polygon service](https://docs.microsoft.com/rest/api/maps/search/getsearchpolygon).
8081

8182
**Sample request:**
8283

@@ -103,11 +104,6 @@ https://atlas.microsoft.com/search/address/reverse/json?api-version=1.0&subscrip
103104
"municipality": "Redmond",
104105
"country": "United States",
105106
"countryCodeISO3": "USA",
106-
"freeformAddress": "Redmond, WA",
107-
"boundingBox": {
108-
"northEast": "47.717105,-122.034537",
109-
"southWest": "47.627016,-122.164998",
110-
"entity": "position"
111107
},
112108
"countrySubdivisionName": "Washington"
113109
},
@@ -167,15 +163,6 @@ https://atlas.microsoft.com/search/address/json?subscription-key={subscription-k
167163
"streetName": "Microsoft Way",
168164
"municipalitySubdivision": "Redmond",
169165
"municipality": "Redmond",
170-
"countrySecondarySubdivision": "King",
171-
"countryTertiarySubdivision": "Seattle East",
172-
"countrySubdivision": "WA",
173-
"countrySubdivisionName": "Washington",
174-
"postalCode": "98052",
175-
"countryCode": "US",
176-
"country": "United States",
177-
"countryCodeISO3": "USA",
178-
"freeformAddress": "Microsoft Way, Redmond, WA 98052"
179166
},
180167
"position": {
181168
"lat": 47.63988,
@@ -347,16 +334,6 @@ https://atlas.microsoft.com/search/address/json?subscription-key={subscription-k
347334
"address": {
348335
"streetName": "Microsoft Way",
349336
"municipalitySubdivision": "Yorkmount, Charlotte",
350-
"municipality": "Charlotte",
351-
"countrySecondarySubdivision": "Mecklenburg",
352-
"countryTertiarySubdivision": "Township 1 Charlotte",
353-
"countrySubdivision": "NC",
354-
"countrySubdivisionName": "North Carolina",
355-
"postalCode": "28217",
356-
"countryCode": "US",
357-
"country": "United States",
358-
"countryCodeISO3": "USA",
359-
"freeformAddress": "Microsoft Way, Charlotte, NC 28217"
360337
},
361338
"position": {
362339
"lat": 35.14267,
@@ -562,19 +539,7 @@ https://atlas.microsoft.com/search/poi/json?subscription-key={subscription-key}&
562539
"address": {
563540
"streetNumber": "2444",
564541
"streetName": "Bel Red Rd",
565-
"municipalitySubdivision": "Bellevue",
566-
"municipality": "Bellevue",
567-
"countrySecondarySubdivision": "King",
568-
"countryTertiarySubdivision": "Seattle East",
569-
"countrySubdivision": "WA",
570-
"countrySubdivisionName": "Washington",
571-
"postalCode": "98007",
572-
"extendedPostalCode": "980073803",
573-
"countryCode": "US",
574-
"country": "United States",
575-
"countryCodeISO3": "USA",
576-
"freeformAddress": "2444 Bel Red Rd, Bellevue, WA 98007",
577-
"localName": "Bellevue"
542+
"municipalitySubdivision": "Northeast Bellevue, Bellevue",
578543
},
579544
"position": {
580545
"lat": 47.63201,
@@ -728,18 +693,6 @@ https://atlas.microsoft.com/search/poi/json?subscription-key={subscription-key}&
728693
"streetNumber": "15248",
729694
"streetName": "Bel Red Rd",
730695
"municipalitySubdivision": "Redmond",
731-
"municipality": "Redmond",
732-
"countrySecondarySubdivision": "King",
733-
"countryTertiarySubdivision": "Seattle East",
734-
"countrySubdivision": "WA",
735-
"countrySubdivisionName": "Washington",
736-
"postalCode": "98052",
737-
"extendedPostalCode": "980525511",
738-
"countryCode": "US",
739-
"country": "United States",
740-
"countryCodeISO3": "USA",
741-
"freeformAddress": "15248 Bel Red Rd, Redmond, WA 98052",
742-
"localName": "Redmond"
743696
},
744697
"position": {
745698
"lat": 47.62843,
@@ -832,18 +785,6 @@ Further let's have a look at the response structure below. The result types of t
832785
"address": {
833786
"streetNumber": "400",
834787
"streetName": "Broad Street",
835-
"municipalitySubdivision": "Seattle, Queen Anne",
836-
"municipality": "Seattle",
837-
"countrySecondarySubdivision": "King",
838-
"countryTertiarySubdivision": "Seattle",
839-
"countrySubdivision": "WA",
840-
"countrySubdivisionName": "Washington",
841-
"postalCode": "98109",
842-
"countryCode": "US",
843-
"country": "United States",
844-
"countryCodeISO3": "USA",
845-
"freeformAddress": "400 Broad Street, Seattle, WA 98109",
846-
"localName": "Seattle"
847788
},
848789
"position": {
849790
"lat": 47.62039,
@@ -878,18 +819,6 @@ Further let's have a look at the response structure below. The result types of t
878819
"score": 8.129190444946289,
879820
"address": {
880821
"streetName": "Broad Street",
881-
"municipalitySubdivision": "Seattle, Downtown Seattle, Belltown",
882-
"municipality": "Seattle",
883-
"countrySecondarySubdivision": "King",
884-
"countryTertiarySubdivision": "Seattle",
885-
"countrySubdivision": "WA",
886-
"countrySubdivisionName": "Washington",
887-
"postalCode": "98109, 98121",
888-
"extendedPostalCode": "981094991, 981213206",
889-
"countryCode": "US",
890-
"country": "United States",
891-
"countryCodeISO3": "USA",
892-
"freeformAddress": "Broad Street, Seattle, WA"
893822
},
894823
"position": {
895824
"lat": 47.61724,
@@ -914,18 +843,6 @@ Further let's have a look at the response structure below. The result types of t
914843
"score": 8.129190444946289,
915844
"address": {
916845
"streetName": "Broad Street",
917-
"municipalitySubdivision": "Seattle, South Lake Union, Queen Anne, Cascade",
918-
"municipality": "Seattle",
919-
"countrySecondarySubdivision": "King",
920-
"countryTertiarySubdivision": "Seattle",
921-
"countrySubdivision": "WA",
922-
"countrySubdivisionName": "Washington",
923-
"postalCode": "98109",
924-
"extendedPostalCode": "981094612, 981094942, 981094970",
925-
"countryCode": "US",
926-
"country": "United States",
927-
"countryCodeISO3": "USA",
928-
"freeformAddress": "Broad Street, Seattle, WA 98109"
929846
},
930847
"position": {
931848
"lat": 47.61965,
@@ -985,53 +902,8 @@ Further let's have a look at the response structure below. The result types of t
985902
"id": "US/XSTR/p1/232144",
986903
"score": 6.754479885101318,
987904
"address": {
988-
"streetName": "Broad Street & John Street",
989-
"municipalitySubdivision": "Seattle",
990-
"municipality": "Seattle",
991-
"countrySecondarySubdivision": "King",
992-
"countryTertiarySubdivision": "Seattle",
993-
"countrySubdivision": "WA",
994-
"countrySubdivisionName": "Washington",
995-
"postalCode": "98109",
996-
"countryCode": "US",
997-
"country": "United States",
998-
"countryCodeISO3": "USA",
999-
"freeformAddress": "Broad Street & John Street, Seattle, WA 98109"
1000-
},
1001-
"position": {
1002-
"lat": 47.61982,
1003-
"lon": -122.34886
1004-
},
1005-
"viewport": {
1006-
"topLeftPoint": {
1007-
"lat": 47.62072,
1008-
"lon": -122.35019,
1009-
"valid": true
1010-
},
1011-
"btmRightPoint": {
1012-
"lat": 47.61892,
1013-
"lon": -122.34753,
1014-
"valid": true
1015-
}
1016-
}
1017-
},
1018-
{
1019-
"type": "Cross Street",
1020-
"id": "US/XSTR/p1/958466",
1021-
"score": 6.754479885101318,
1022-
"address": {
1023-
"streetName": "Broad Street & Roy Street",
1024-
"municipalitySubdivision": "South Lake Union, Seattle, Cascade",
1025-
"municipality": "Seattle",
1026-
"countrySecondarySubdivision": "King",
1027-
"countryTertiarySubdivision": "Seattle",
1028-
"countrySubdivision": "WA",
1029-
"countrySubdivisionName": "Washington",
1030-
"postalCode": "98109",
1031-
"countryCode": "US",
1032-
"country": "United States",
1033-
"countryCodeISO3": "USA",
1034-
"freeformAddress": "Broad Street & Roy Street, Seattle, WA 98109"
905+
"streetName": "Broad Street & Valley Street",
906+
"municipalitySubdivision": "South Lake Union, Seattle",
1035907
},
1036908
"position": {
1037909
"lat": 47.62545,

0 commit comments

Comments
 (0)