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.