Saturday, December 22, 2012

Add items to the autocomplete using PowerShell



If you want to add multiple keywords to autosuggestion of fast:

  1. Create file with keywords separated by newline.
  2. Run Command below to add elements from your file to auto suggest list.Get-content “Auto Suggest File Path” | foreach-object {   New-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication “FastQuery” –Language en-US –Type QuerySuggestionAlwaysSuggest –Name $_ }
  3. Use Commands below to refresh the cache:
    $timer=Get-SPTimerJob|? {$_.Name –eq “Prepare Query Suggestions”}
    $timer.RunNow()

No comments: