Adding Custom Search Suggestions in SharePoint 2013

Display Templates Search Searchbox
post

This post is over a year old, some of this information may be out of date.

By default search suggestions are enabled on the default search boxes in SharePoint 2013.

Show image Search Suggestions
Search Suggestions

Server administrators are still able to manually add search suggestions via PowerShell, but the commands have been changed a little.

Check out the following blog post how to do it in SharePoint 2010.

The command that has been changed is the New-SPEnterpriseSearchLanguageResourcePhrase. This cmdlet now has a new required parameter named Owner.

Technet information about Owner: “Specifies the search object owner that defines the scope at which the corresponding LanguageResourcePhrase is created”.

This Owner parameter is also used in the Get-SPEnterpriseSearchLanguageResourcePhrase.

The Available levels that can be used are:

  • Search Service Application: SSA;
  • Site Subscription: SPSiteSubscription;
  • Site Collection: SPSite;
  • Site: SPWeb.

You need to run the following commands to create search suggestions:

Terminal window
$searchapp = get-SPEnterpriseSearchServiceApplication
$owner = Get-SPEnterpriseSearchOwner -level SSA
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language En-Us -Type QuerySuggestionAlwaysSuggest -Name "Suggestion 1" -Owner $owner
Start-SPTimerJob -Identity "Prepare query suggestions"

Want the next article?

Subscribe to the RSS feed, or follow me where I share new posts.

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

I build developer tools · Microsoft 365 architect · Speaker

Loading...

Let's build together

All your AI coding agents in one window

Present from VS Code

Manage content in VS Code

See all my projects →