Sorting by Distance or Best?

Should the results be sorted by the distance or by the best match by default? This often comes up and there is no simple answer to what is better for your site.  While most sites are setup to give the user options for how results should be displayed and what type of search they want to do (proximity/coverage) the vast majority of visitors never change these options and probably don’t always understand what they mean. Therefore, whatever you set as your defaults become extremely important.

There are a lot of factors to think about when setting your defaults. If I am using a city as my location then the distance of the search results is to wherever Google puts the center latitude/longitude of the city. This could be very accurate or very arbitrary making sorting by distance somewhat meaningless. However, if I am using an exact address or postal code then sorting by distance makes more sense.

If your site is setup to support less densely populated areas, services may be spread out further from one another and there may only be one program that provides a service whereas searching areas like downtown Toronto have thousands of services and many related services packed in close together. Coverage searches become more important in less populated areas as there may be no services within the search proximity so the best result may be an service that is located far away. This may also be true for densely populated areas where there are only provincial services providing the service.

Since category/topic searches are not scored, there are only two options – sort alphabetically or by distance. Sorting category/topic searches by best will default to distance.

The problem with sorting by distance for keyword searches:

A keyword search can return hundreds of matching results, some that match significantly better than others. If you sort these results by distance, you may  have services that show up first that are not relevant. This is even more apparent in densely populated areas with lots of services or using a large proximity/distance. How good or bad this can become depends entirely on the keywords searched and the area they are searched in. It is recommended that keyword searches are always defaulted to sort by best to avoid this problem. A low score filter can also be applied to remove low scoring results but won’t completely eliminate this issue.

A new option has been added to the Data Portal plugin under the Search Form panel. Set the Default Search to “Topic-Distance/Keyword-Best” and your site will automatically switch the sort order depending on the type of search the user is doing. The user can always override these settings if they desire.