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

Adding Custom Search Suggestions in SharePoint 2013

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:

1
2
3
4
5
6
$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"

Comments

Back to top