Delete automatically added query suggestions

Hi,

We have some query suggestions added manually and some of them are added automatically on our site. There is a person who has left the organization now and his name is always popping up in the query suggestion and we want to remove it (not block it)

I am using a command below to list all the query suggestions and getting his name:

Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $searchapp

However, when I run the command:

Remove-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language EN-US -Type QuerySuggestionAlwaysSuggest -Identity "firstname lastname"

I am getting an error below:

Remove-SPEnterpriseSearchLanguageResourcePhrase : The given key was not present in the dictionary. At C:\Users\User\Desktop\Remove_Suggestion.ps1:7 char:48 + Remove-SPEnterpriseSearchLanguageResourcePhrase <<<<  -SearchApplication $searchapp -Language DE-ch -Type QuerySugges
tionAlwaysSuggest -Identity $Suggestion
    + CategoryInfo          : InvalidData: (Microsoft.Offic...eResourcePhrase:RemoveSearchLanguageResourcePhrase) [Rem
   ove-SPEnterp...eResourcePhrase
], KeyNotFoundException
    + FullyQualifiedErrorId : Microsoft.Office.Server.Search.Cmdlet.RemoveSearchLanguageResourcePhrase

Any helps is greatly appreciated.

November 15th, 2013 3:01pm

Try using the 

Get-SPEnterpriseSearchQuerySuggestionCandidates

Powershell command to look at all the Query suggestions in your system. That should make it possible to find the exact key you need.


Free Windows Admin Tool Kit Click here and download it now
November 15th, 2013 5:07pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics