1. Search Alerts Administration
Search alerts in SharePoint are a mechanism to
enable users to be notified or alerted by e-mail or SMS text message
whenever a specific query would return new results or when the content
of existing results has changed. Alerts are personal and can be
configured and viewed only by the user who created them.
Search alerts have two requirements for the SharePoint farm configuration:
- Search alerts must be enabled on the Search service application.
- Outgoing e-mail must be configured.
By default, search alerts are deactivated for the Search service applications (Figure 1). To enable search alerts, you must use an account that has administrative rights to the Search service application.
Figure 1. Toggling search alerts
To activate search alerts for a Search service application, do the following:
- Go to Application Management => Manage service applications.
- Click the Search service application.
- Locate “Search alerts status”, and click the Enable button.
When performing the Reset Index operation for
the Search service application, SharePoint will ask if search alerts
should be disabled for this operation. This is recommended, as doing
this operation otherwise would fire all configured search alerts where
the “alert on changes” option is set, which it almost always is.
Note
Changes that trigger search alerts are based on the crawled content. An
alert can therefore never fire more often than the crawl intervals of
the content sources that yield the search results for the specific
search alert.
2. Search Suggestions
Search suggestions (called query suggestions on
the Search Box Web Part) work similarly to the Bing search dialog, by
providing a list of suggested search terms below the search box while a
query is typed, as shown in Figure 2.
Figure 2. SharePoint 2010 Enterprise Search Box with search suggestions
Search suggestions are one of the topics that
often cause confusion and are difficult to try out in test environments.
This is partially because of the way search suggestions are activated,
and partially because they cannot be managed through the SharePoint user
interface.
The most important thing to understand about
search suggestions is when they are added. Only search terms that yield
results that actually get clicked will go into the search suggestion
pool. A minimum of six clicks per year is required for the term to show
up as a search suggestion.
It is possible to add and remove search
suggestions manually. This can be done by using PowerShell commands
through the SharePoint 2010 Management Shell.
Viewing Search Suggestions
To list existing search suggestions, you can run the commands in Listing 1 from the SharePoint 2010 Management Shell.
Listing 1. Listing Search Suggestions
$app=Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchQuerySuggestionCandidates –SearchApp $app
Adding Search Suggestions
To add new search suggestions, you can run the commands in Listing 2 from the SharePoint 2010 Management Shell.
Listing 2. Adding Search Suggestions
$app=Get-SPEnterpriseSearchServiceApplication
New-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication $app –Language en-US
-Type QuerySuggestionAlwaysSuggest –Name “SharePoint Search”
This will add the query “SharePoint Search” to the search suggestions list.
The search suggestion will show up in the search
dialog only after the Prepare Query Suggestions timer job has executed.
Per default it is scheduled to run daily between 1 a.m. and 11 p.m.
To get the search suggestions to show up immediately, run the commands in Listing 3 from the SharePoint 2010 Management Shell.
Listing 3. Running the Prepare Query Suggestions Timer Job
$timer=Get-SPTimerJob|? {$_.Name –eq “Prepare Query Suggestions”}
$timer.RunNow()
Removing Search Suggestions
To remove search suggestions, run the commands in Listing 4 from the SharePoint 2010 Management Shell.
Listing 4. Removing Search Suggestions
$app=Get-SPEnterpriseSearchServiceApplication
Remove-SPEnterpriseSearchLanguageResourcePhrase –SearchApplication $app –Language en-US
-Type QuerySuggestionAlwaysSuggest –Identity “SharePoint Search”
This will remove the query “SharePoint Search”
from the search suggestions list. The search suggestion will be removed
from the search dialog only after the Prepare Query Suggestions timer
job has executed. Per default it is scheduled to run between 1 a.m. and
11 p.m. To get the search suggestions removed immediately, run the
following commands in Listing 5 from the SharePoint 2010 Management Shell.
Listing 5. Running the Prepare Query Suggestions Timer Job
$timer=Get-SPTimerJob|? {$_.Name –eq “Prepare Query Suggestions”}
$timer.RunNow()