Background
Location search is very difficult to get right. One reason for this is there are a lot of duplicate names for cities, regions, towns and other places. For example, take a query like doctors in canton
. In the US alone there are 4 cities named Canton (Ohio, Michigan, Georgia, and Massachusetts). So which Canton is the user looking for?
Answers will automatically use the users’ location and place popularity to try and figure this out but sometimes that’s not enough.
While there isn’t a one size fits all solution for this problem, for a company like IHA (a regional hospital located in Michigan) the preferred Canton is obvious - it’s Canton, Michigan. All of their doctors and locations are located in Michigan so it’s extremely unlikely that someone would be looking for Canton Mass even if they were searching from New Hampshire.
Introducing Bounding Box
Bounding Box is a new configuration option that tells Answers to only search for locations within a specified rectangle (a.k.a. bounding box). For any business that is local, a bounding box is recommended to improve the accuracy of location search.
Note: If a business has entities across a country or across the world, this configuration option will not help and should not be used.
A new top-level property named boundingBox
can now optionally be set on an experience configuration. It applies to all Verticals and to both Universal and Vertical search. It is set at the experience level.
Here is an example for IHA:
{
"name": "IHA Answers",
"boundingBox": {
"minLatitude": 41.4054,
"minLongitude": -85.1803,
"maxLatitude": 43.3513,
"maxLongitude": -81.4989
},
}
Now when I search for doctors near canton
from New York City, Answers knows to use the right Canton!
Finding the right Bounding Box
In order to get the right lat/lng to specify, you can use a tool like http://bboxfinder.com/. Specify a rectangle and then use it to get the lat/lng of each corner. You should make sure to make the rectangle big enough to encompass all locations and nearby POI but also small enough to improve the location accuracy.
In the future, we plan on making it easier to find the right Bounding Box based on the entities in the Knowledge Graph.
Please let us know if you have any questions.