Freigeben über


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

Comments

  • Anonymous
    January 01, 2003
    Thank you for providing SharePoint Online specific info, this is frequently not done and i appreciate the extra effort.

  • Anonymous
    January 01, 2003
    Hi Burcu,

    The "Did you mean?" feature is also knows as query spelling corrections. See this article for information on how you can use this feature: http://technet.microsoft.com/en-us/library/jj591607(v=office.15).aspx

    Note that query spelling corrections are not available for SharePoint Online.

    Hope this helps,
    Bella

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Hi Manasi,

    I'm not quite sure if I understand your scenario, but I think you have to use the Never suggest phrases option. For example, say that your users are seeing the query suggestion "coffffee" when users start to type "co". The query suggestion that they should see is "coffee". In this case, you have to add "coffffee" to Never suggest phrases.

    You can never disable the dynamic query suggestions. They're based on a different dictionary that can't be edited.

    Hope this helps.

    Bella

  • Anonymous
    December 07, 2013
    Excellent article!!!

  • Anonymous
    December 11, 2013
    Hi Bella, you wrote ... After you have uploaded your query suggestions file, it might take a few hours before your query suggestions are displayed. ... There is a SharePoint Server 2013 job called 'Prepare query suggestions'. Run it and the suggestions are available for testing.

  • Anonymous
    December 11, 2013
    Hi Rico, Thanks for adding this information :-) Please note that it's not possible to run this job in SharePoint Online. Bella

  • Anonymous
    December 11, 2013
    Great article Bella!  Thanks for sharing.

  • Anonymous
    December 12, 2013
    Thanks for sharng !

  • Anonymous
    December 27, 2013
    Pingback from Create and import query suggestions in SharePoint 2013 | Office 365 Singapore for Business - Win-Pro

  • Anonymous
    April 29, 2014
    Thanks for sharing this info. Those who are newcomers for SharePoint will definitely get benefited as you have mentioned very nicely and clearly how to import a query suggestions file to SharePoint Server 2013.

    Keep it up!

  • Anonymous
    September 22, 2014
    Hi Bella,
    Thanks for sharing.
    Do you have a document about "Did You Mean?" static suggestions? Can we upload file in the same manner as written in this document? And is there a sharepoint service to pass "did you mean" words that are uploaded as txt file in our own admin page to FAST search system?
    Thanks!

  • Anonymous
    April 15, 2015
    Hi Bella,

    Thanks for sharing this. Couple questions:

    1. How are these query suggestions different to suggestions that fall under 'Are you looking for..' i.e. People Name Suggestion' ? I believe people name suggestions are based on phonetic and fuzzy matching ? Is there any way to customize the results that come under 'Are you looking for..' similar to what you drafted ?

    2. How SharePoint Search Service differentiates the Query Suggestions and People Name Suggestions i.e. results for 'Are you looking for..'

    I hope my questions are not out of context.

    Thanks again !