none
Location Search - Auto Suggest Feature

    Question

  • Hi,

    The application uses auto-suggest feature for UK location names using Bing REST location service. Issue is that the result returned from BING doesn't include all expected location names. For example when user searches for Birmingham, BING doesn't return Birmingham until the user types in 'Birmingh'. The expected result is to return Birmingham for 'Birmin' or 'Birming'

    The URL used for invoking the REST API is http://dev.virtualearth.net/REST/v1/Locations/UK/birming?maxResults=100&key=<key>

    Please suggest if there is any additional parameters to be passed to get the expected result or any other APIs to be used.

    Thanks,

    Deepa

    Saturday, March 08, 2014 9:18 AM

Answers

  • First off, the maxResults parameter of the location API can be et to a maximum of 20. Setting it any higher will not return any more results.

    Secondly, the location API is a geocoding service. Geocoders are designed to return the most likely results based on a number of factors the culture code used and the users physical location. For example, if you are in the UK then Birmingham, UK would be ranked higher than Birmingham, Atlanta. If you were in the US or used  en-US culture code then these results would be reversed. The goal of this service is to return the most likely results, not all possible results. There are billions of addresses in Bing Maps, having it return all possible matches when only a few characters are returned would be slow, and a waste.

    Thirdly, using the location API to do auto suggest is not recommended as it drastically increases the number of transactions generated by your app.

    A much better approach to create the type of functionality you are looking for is to create a user ranked auto suggest. This will drastically improve the suggestions to the user and will make for a much better user experience while minimizing the amount of wasteful calls made to the Bing Maps service. The idea behind the user ranked auto suggest is to create a database where you can store the locations selected by your users. Every time a user selects a location in the auto suggest a rank value is increased and the ordering of the suggestions is based on the rank value. If the user does not find any results in the auto suggest that match their query, that's when they press the search button and you call the Bing Maps service to return possible results. If they select any of the results you would then add that result to your database. I have a couple of customers who have done this and after a few months they were hardly generating any transactions against Bing Maps which meant lower costs over the long term. It also meant that they had a lot of insight into what their users are looking for and which locations were the most popular. This kind of insight can be very valuable.


    http://rbrundritt.wordpress.com

    Sunday, March 09, 2014 11:53 AM
  • There is no public service at the moment. Currently this is being trialed on the Bing.com/maps site as a possible future feature.

    http://rbrundritt.wordpress.com

    Monday, March 10, 2014 6:10 PM
  • You can find a blog post on how to do Customer Ranked auto suggest with Bing Maps here : http://blogs.msdn.com/b/rbrundritt/archive/2014/03/31/how-to-create-a-customer-ranked-auto-suggest-with-bing-maps-and-azure-mobile-services.aspx

    http://rbrundritt.wordpress.com

    Monday, March 31, 2014 4:29 PM

All replies

  • First off, the maxResults parameter of the location API can be et to a maximum of 20. Setting it any higher will not return any more results.

    Secondly, the location API is a geocoding service. Geocoders are designed to return the most likely results based on a number of factors the culture code used and the users physical location. For example, if you are in the UK then Birmingham, UK would be ranked higher than Birmingham, Atlanta. If you were in the US or used  en-US culture code then these results would be reversed. The goal of this service is to return the most likely results, not all possible results. There are billions of addresses in Bing Maps, having it return all possible matches when only a few characters are returned would be slow, and a waste.

    Thirdly, using the location API to do auto suggest is not recommended as it drastically increases the number of transactions generated by your app.

    A much better approach to create the type of functionality you are looking for is to create a user ranked auto suggest. This will drastically improve the suggestions to the user and will make for a much better user experience while minimizing the amount of wasteful calls made to the Bing Maps service. The idea behind the user ranked auto suggest is to create a database where you can store the locations selected by your users. Every time a user selects a location in the auto suggest a rank value is increased and the ordering of the suggestions is based on the rank value. If the user does not find any results in the auto suggest that match their query, that's when they press the search button and you call the Bing Maps service to return possible results. If they select any of the results you would then add that result to your database. I have a couple of customers who have done this and after a few months they were hardly generating any transactions against Bing Maps which meant lower costs over the long term. It also meant that they had a lot of insight into what their users are looking for and which locations were the most popular. This kind of insight can be very valuable.


    http://rbrundritt.wordpress.com

    Sunday, March 09, 2014 11:53 AM
  • Hi Ricky,

    Thanks for the detailed response. The search result remains the same even after setting UK culture code, user IP etc.

    Could you please confirm if there is any other auto-suggest service that BING provides? Wondering if the auto-suggest feature used in BING maps (http://www.bing.com/maps/) uses any public APIs or not? If not, we need to check the feasibility of the solution that you have suggested before. 

    Thanks,

    Deepa

    Monday, March 10, 2014 4:53 PM
  • There is no public service at the moment. Currently this is being trialed on the Bing.com/maps site as a possible future feature.

    http://rbrundritt.wordpress.com

    Monday, March 10, 2014 6:10 PM
  • You can find a blog post on how to do Customer Ranked auto suggest with Bing Maps here : http://blogs.msdn.com/b/rbrundritt/archive/2014/03/31/how-to-create-a-customer-ranked-auto-suggest-with-bing-maps-and-azure-mobile-services.aspx

    http://rbrundritt.wordpress.com

    Monday, March 31, 2014 4:29 PM