Load Query Suggestions Script


#Set up default variables
$csvfile=”C:\data\SearchSuggestions.csv”
$ssa = Get-SPEnterpriseSearchServiceapplication -Identity “Search Service Application”

#Create Lists from each item in CSV file
$csvData = Import-Csv $csvfile
foreach ($line in $csvData)
{
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $ssa -Language en-US -Type QuerySuggestionAlwaysSuggest -Name $line.Suggestion
}

$timerJob = Get-SPTimerJob “Prepare query suggestions”
$timerJob.RunNow()

Tagged with:
Posted in Microsoft SharePoint Server

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Antek Group Blog
Categories
%d bloggers like this: