Create and import query suggestions in SharePoint 2013

An easy way to help users search for information in SharePoint is to create query suggestions. Query suggestions are words that appear under the search box as users type a query.

Example of query suggestion

SharePoint automatically creates a query suggestion when users have clicked a search result for a query at least six times. For example, if users have entered the query word “coffee” and then clicked on a search result six times, then “coffee” automatically becomes a query suggestion.

You can also create query spelling suggestions manually. In this blog post I’ll use a simple example to show how you can do that. In this blog post I’ll explain:

How to create a query suggestions file

  1. Open a text editor, for example Notepad.
  2. Enter the query spelling suggestions that you want to add. Add one word or phrase per line.

Example of query suggestion list

  1. Save the file as a .txt file and encoding UTF-8.

Save query suggestion list

Now that you have your query suggestions file, the next step is to import it to SharePoint.

 

How to import a query suggestions file to SharePoint Online

  1. From the O365 Admin menu, select SharePoint.

O365 Admin menu

  1. On the SharePoint admin center, select search.

SharePoint admin center

 

  1. On the search administration page, select Query Suggestion Settings.

Query Suggestion Settings

  1. In the Language for suggestions phrases section, select the language of your query suggestions. In the Always suggest phrases section, select Import from text file.

Select Import from text file

  1. In the Text file with phrases section, select Choose File, and import your query suggestions file.

Select Choose File

  1. Select OK, and then Save Settings.

Save Settings

 

IMPORTANT: When you import query suggestions, existing query suggestions will be overwritten. If you haven’t previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions will not be overwritten when you import new ones. However, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then re-import it.

 

How to import a query suggestions file to SharePoint Server 2013

  1. Go to Central Administration --> Manage service applications --> Search Service Application --> Query Suggestions.
  2. On the Query Suggestion Settings page, in the Always suggest phases section, select Import from text file.

Import query suggestions file

  1. On the Import phrases for query suggestions page, select Browse, and import your query suggestions file.

Browse for your query suggestions file

  1. Select OK, and then Save Settings.

Save Settings

 

IMPORTANT: When you import query suggestions, existing query suggestions will be overwritten. If you haven’t previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions will not be overwritten when you import new ones. However, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then re-import it.

 

How to verify that your query suggestions are working

IMPORTANT: After you have uploaded your query suggestions file, it might take a few hours before your query suggestions are displayed.

To verify that your query suggestions are working correctly, in a search box, type two letters of a phrase from your query suggestions file. The query suggestions appear under the search box.

Cup of Joe query suggestion

Caffe Latte query suggestion

 

Additional resources

 

QuerySuggestions_coffee.txt