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.
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
- How to import a query suggestions file to SharePoint Online
- How to import a query suggestions file to SharePoint Server 2013
- How to verify that your query suggestions are working
How to create a query suggestions file
- Open a text editor, for example Notepad.
- Enter the query spelling suggestions that you want to add. Add one word or phrase per line.
- Save the file as a .txt file and encoding UTF-8.
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
- From the O365 Admin menu, select SharePoint.
- On the SharePoint admin center, select search.
- On the search administration page, select Query Suggestion Settings.
- 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.
- In the Text file with phrases section, select Choose File, and import your query suggestions file.
- Select OK, and then 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
- Go to Central Administration --> Manage service applications --> Search Service Application --> Query Suggestions.
- On the Query Suggestion Settings page, in the Always suggest phases section, select Import from text file.
- On the Import phrases for query suggestions page, select Browse, and import your query suggestions file.
- Select OK, and then 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.
Additional resources
- Manage query suggestions in SharePoint Server 2013
- How to customize query suggestions for SharePoint search