Create and import query suggestions for the classic search experience in SharePoint Server

APPLIES TO: yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

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

Query Suggestions

SharePoint Server 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. We can also create query spelling suggestions manually. In this article, we'll use a simple example to show how to do this.

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.

    Query Suggestion List

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

    Save as TXT File

Now that you have a query suggestions file, the next task is to import it to SharePoint Server.

How to import a query suggestions file to SharePoint

  1. Go to More features in the SharePoint admin center, and sign in with an account that has admin permissions in Microsoft 365.

  2. Under Search, select Open.

  3. Select Query Suggestion Settings.

    Select Query Suggestion Settings

  4. 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

  5. In the Text file that has phrases section, select Choose File, and import your query suggestions file.

    Import Query Suggestions File

  6. Select OK, and then Save Settings.

    Click Save Settings

Important

When you import query suggestions, existing query suggestions are 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. But, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then reimport it.

How to import a query suggestions file to SharePoint Server

  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 from Text File

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

    Select Browse

  4. Select OK, and then Save Settings.

    Save Settings

Important

When you import query suggestions, existing query suggestions are overwritten. If you haven't previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions won't be overwritten when you import new ones. But, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then reimport it.

How to verify that your query suggestions are working

Important

After you have uploaded your query suggestions file, it might take some 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.

Query suggestions appear

Query suggestion under search box

See also

Concepts

Manage query suggestions in SharePoint Server

Other Resources

Customize query suggestions in SharePoint search