Before
perform search in SharePoint 2010 we need to Create and Configure a Search
Service Application. After creating a Search Service Application then need to configure crawling. following section shows how to configure Crawl
Crawling Configuration
If we search anything in site collection level, it will
never give any results to the user.
·
Login to central admin using the farm admin
credential
·
Access to
“Manage service applications” under
“Application Management”
·
Click on [Search Service Application]
·
Click on “Content
Sources” under “Crawling” in the left navigation
·
Click on the dropdown arrow “Local
SharePoint sites” and click “Edit”. (If you want to create a new content source
you can create by clicking “New Content Source” button. Here I have used the “Local
SharePoint sites”)
· Ensure the following values are set.
·
Give <site> url as the “Start Address” (If
there are any <anonymous site> then give that url too).
·
For the schedule of “Full crawl” and
“Incremental crawl”, click on “Edit Schedule” and use the default and click OK
·
At the end of this process start full crawl of
this content source. Click on the dropdown arrow
“Local SharePoint sites” and click “Start Full Crawl”
Create Crawl Rules
After The Full Crawl is finished, we can search in site collection
level. But in search result it gives some odd results as bellow and often need to omit:
§
/SiteCollectionImages/Forms/Thumbnails.aspx
§
/PublishingImages/Forms/Thumbnails.aspx
§
/Pages/Forms/AllItems.aspx
§
/Lists/News/AllItems.aspx
§
/PublishingImages/Forms/AllItems.aspx
§
/Pages/Forms/my-sub.aspx
§
/Pages/Forms/mod-view.aspx
To do this we need to add “Crawl
Rules”. Following section shows how to add “Crawl Rules”
·
Access to
“Manage service applications” under
“Application Management”
·
Click on [Search Service Application]
·
In
“Search Service Application” click on “Crawl Rules” under “Crawling”
·
The following table shows some of rules which
can be added to exclude content while crawling
Rules
|
Include or exclude
|
*://*/pages/default.aspx
|
Exclude
|
*://*webfldr.aspx*
|
Exclude
|
*://*mod-view.aspx*
|
Exclude
|
*://*my-sub.aspx*
|
Exclude
|
*://*thumbnails.aspx*
|
Exclude
|
*://*allitems.aspx*
|
Exclude
|
*://*/lists/*
|
Exclude
|

·
Give the path as given in “Rules” column in
above table and click “Exclude” option to exclude content while crawling and
click OK.
·
Repeat above steps for each rule
Site Collection Level Configuration
Search settings
The Search box is a small text box with a text as “Search
This Site…” which located In the top of the SharePoint site collection. If the
user search using this search box then it will go to the SharePoint default
search results page. We can create a custom search results page and change to
it from default search results page, can give a search center, and can define a
set of search scopes which appear next to the search box. These changers can be
done from search settings page.
·
Login to root site as site collection
administrator
·
Navigate to settings page by Site Actions à Site Settings
·
Click on “Search settings” under “Site
Collection Administration”.
There are two options
in Search Settings
1.
Enable custom scopes (Such as “All Sites”) by
connecting this site collection with the following search center
If you are using a search center then can use this option. You can target
your search results to a search center, which is essentially a custom search
results page.
2.
Do not use custom scope. Use only contextual
scopes (such as “This Site”). Display results in the site collection
By default search
will use SharePoint default Search page.
Search drop down
modes
·
Do not show scopes dropdown, and default to
contextual scope
·
Do not show scopes dropdown, and default to
target results page
·
Show scopes dropdown
·
Show, and default to ’s’ URL parameter
·
Show and default to contextual scope
·
Show, do not include contextual scopes
·
Show, do not include contextual scope, and
default to ’s’ URL parameter
Search Scopes and Rules
Users can enable Search Scopes to narrow their searches. It
will make easier for the user to do a search.
Add a Scope
·
Login as site collection administrator
·
Navigate to settings page by Site Actions à Site Settings
·
Click on “Search scopes” under “Site Collection
Administration”.
·
For example I’m adding the “Search All” search
scope for the site collection:
·
Search All : To search content in the site and
does not search people
·
Click New Scope link and ensure that the
following values are set
Title: Search All
Description:
Search All - Search the entire web including all
Add rules to the
Scope
I have added a rule to “Search All” scope to search in all
content as follows
·
Click “New Rule” and set the “Scope Rule Type”
as “All Content” and click OK.
I have added another rule to “Search
All” scope to exclude people search as follows:
·
Click “New Rule” and set the “Scope Rule Type”
as “Property Query”
·
Add the property query as follows:
·
Select “contentclass” from the dropdown
·
urn:content-class:SPSPeople
Display groups
If user needs to change the order of the scopes in scope
drop down or to remove any scopes from the scope drop down, then user can do
this from display groups in scope settings page.
·
Site Actions à
Site Settings
·
Click on “Search scopes” under “Site Collection
Administration”.
·
Click On “Display Groups”
· Click on “Search Dropdown” then you can change
the order of the scopes in scope drop down or to remove any scopes from the scope
drop down.
Use of Search Center
The Search Center is a
special type of SharePoint site template. By default there is a Basic Search Center
sub site called “Search” in site collections. But if there is a case you need
to create a Search center and you cannot find the “Basic Search Center”
template then you need to add this site template, because this is hidden by
default.
You can activate this by following
steps:
·
Go to Site Actions->Site Settings
·
Under “Look and Feel” click “Page layouts and site templates”
·
Need to add the “Basic Search Center” sub site template
In Search settings user can set the search center and a
search results page in search center. To create a search results page follow
the following steps:
·
Navigate to search center and click site actions
à view all site collections.
·
If user cannot see the pages library then need
to activate the “SharePoint publishing feature” in the search center.
·
Go to the pages library and create a new page
using “Search Results” page layout. This page can be given to the site collection
search results page in “search settings” page. Then the result will be
displayed in the new search results page.
Following are some web parts in Search results page:
·
Search box
·
Search core results
·
Refinement panel
·
Search statistics
·
Search action links
Search Web part Changers
You can enable the display of scopes drop down to help users limit the content they are searching. Also can create your own custom advanced search or search results pages and configure this web part to navigate to these. User can enable links to advanced search page and preferences page which configure search suggestions and search language.
·
Go to search results page
·
Go to Site Actions à Edit Page
·
Find “Search Box” web part and go to web part
properties.
·
Press “OK” at the bottom to apply the changes.
·
Save and close the page
Enable query suggestions
It
is possible to let the search box give you a suggestion when you start typing a
search term. For example if user needs query suggestions as bellow image, first
need to check the “show query suggestions” check box in “Search Box” web part.
After that need to follow bellow configurations in central administration.
·
Got to Central Administration.
·
Go to Application Management à Manage service applications.
·
Click the Search service
application
·
On the Search Administration page,
under System Status section, click on “Disable” Query logging. Then it will change to “Enable” status
To enable
the display of the "Did you Mean?" message in the search result page
do following steps.
·
Go to search results page
·
Go to Site Actions à Edit Page
·
Find “Search Summary” web part and go to web
part properties.
·
In the Miscellaneous section, check the "Show
Messages" checkbox. This checkbox is not checked by default.
Happy
Searching!!!
No comments:
Post a Comment