Removing special characters in FAST Search 2010 Query suggestion
Query suggestions, also known as search suggestions is one of the feature of FAST Search 2010 which provides better search experience to end-users. When users start to type their query, they will get a drop down below the search box with suggestion that they can click on to instantly issue the query to the search engine.
You can follow the below steps to configure query suggestions
Verify that the user account that is performing this procedure is a site owner on the Search Center site.
On the Search Center site home page, click Site Actions, and then click Edit page.
On the Search Box Web Part menu, click Edit Web Part.
Expand the Query Suggestions node.
Make sure that the Show query suggestions box is selected. If you want to turn off query suggestions, clear the Show query suggestions check box.
Query suggestions are automatically created over a period of time based on how often the users search for a specific query within a certain timeframe.
You can also manually add the query suggestion by using the PowerShell command. When you use Windows PowerShell to manually add query suggestions, you immediately provide the benefits of query suggestions to users of a newly installed search system.
If query suggestion contains special characters, then you can use the “Windows PowerShell ISE” to manage it as given in the below example.
Go to SharePoint Server --> Add the feature “Windows PowerShell ISE” in windows Server by using Server Manager.
Open “Windows PowerShell ISE” and Add snapin: Add-PSSnapin Microsoft.Sharepoint.PowerShell
Use the below command to manually add the query suggestion “Parent�S Resource Guide”
$searchapp = Get-SPEnterpriseSearchServiceApplication "<QuerySearchServiceApplicationName>"
Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $searchapp
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language EN-US -Type QuerySuggestionAlwaysSuggest -Name "Parent�S Resource Guide"
Start-SPTimerJob -Identity "prepare query suggestions"
You can see the query suggestion immediately after running the timer job in the Search Center page as given below.
To remove the manually added query suggestion use the below command.
Remove-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $searchapp -Language En-Us -Type QuerySuggestionAlwaysSuggest -Identity "Parent�S Resource Guide"
Start-SPTimerJob -Identity "prepare query suggestions"
Then check the behavior. This should remove the query suggestion "Parent�S Resource Guide".
If query suggestions are automatically created, then you have to block it and you cannot remove it.
If let’s say query suggestion "Parent�S Resource Guide" is automatically created, then you have to block it by using below command
$searchapp = Get-SPEnterpriseSearchServiceApplication "<QuerySearchServiceApplicationName>"
Get-SPEnterpriseSearchQuerySuggestionCandidates -SearchApplication $searchapp
New-SPEnterpriseSearchLanguageResourcePhrase -SearchApplication $SearchApp -Language en-us –Type QuerySuggestionBlockList -Name "Parent�S Resource Guide"
Start-SPTimerJob -Identity “Prepare query suggestions”
Please note that query suggestion keyword is “case sensitive”.
Published by - Prasad Joshi