Monday, July 2, 2012

How to Configure search in SharePoint 2010



In order for your SharePoint site to be searchable, we have to do some sort of configuration in central administration and your SharePoint site also.

First we need to create search center in a site collection.(here am creating with in the site collection but we can create search center site as new site collection)

Note: search center means where we are going to display search results.

Before Creating New site for search site we need to activate two features

1. SharePoint Server Publishing Infrastructure(Site collection features under 'Site Collection Administrator'.




2. SharePoint Server Publishing (Manage site features under "Site Actions").





Now go to your site -->Site Actions--> New Site

Specify Title and Description,website address,template selection as 'Enterprise Search Center' under Enterprise tab.
and for remaining fields use default settings. Then click on 'Continue'.


Now copy the search center site url(which looks like 'http://<servername>:6969/Search/Pages/default.aspx'

3. Now Go To site's SiteSettings-->click on  'search settings under' Site Collection Administrator.

4. Select 'Enable custom scopes by connecting this site collection with the following search center' and
specify search center site url upto pages and remove "/default.aspx" from site url (i.e http://sreenu:6969/Search/Pages) And now click on "OK".


Now we need to configure Search Service Application..

5. Go to Central Administration-->Manage service application under Application Management --> Click on 'Search Service Application'.

6. Now Click on content sources(under Crawling).



NOTE: bydefault one content source available in 'Content Sources' i.e Local SharePoint sites. whenever we create new web application that will automatically adds to this content source.

If you want to create new content source for your site u have to remove ur site url from the default Content source i.e 'Local SharePoint sites'.




i want to create new content source for my sharepoint site i.e http://<servername>:6969 and i want to add people search in my content search for that am removing the following two URLs from default content source.

http://<servername>:6969
sps3://<servername>    ---> this is for people search site url.

7. Now click on Content sources under Crawling, click on 'New Content Source'.


Specify Name 'UdaySharePoint6969', select 'SharePoint sites' in Content Source Type, Specify Start Addresses to which site u want to search

i.e
http://<servername>:6969
sps3://<servername>

Check 'Start full crawl of this content source' and click 'OK'.



it will start full crawling content source.



8. After Completion of crawl, click on Scopes under 'Queries and Results'.

Click on New Scope.


Specify Name of the scope and Click on "OK".

9. After creation of scope add rules to the scope, in add scope rule select 'Content Source' as Scope Rule Type then select your SharePoint content as Content Source.Then click on "OK".
it will takes some time to available for search.







Upto now we done modification in central administration.

Now to go to your SharePoint,

10. Go to SiteActions--> click 'Search scopes' under Site Collection Administration.


11. Click on 'Display Groups'.


12. Select Search Dropdown's Edit Display Group.


13. Check your Scope (which was created in central admin). then Click on "OK".



14. Now select Advanced Search's Edit display group.


15. Check your scope  (which was created in central admin). then Click on "OK".

Search Settings are completed and your sharepoint site is ready for search.

Now go to your sharepoint site and search ...

Note: till now i didnt added any new document/item to sharepoint site.so for testing, am testing my sharepoint site with the key word 'Annoucement' because by default this list is available in sharepoint site.

16. Go to sharepoint site and you can find search control on top right side. In this select your scope from dropdown i.e Uday6969 and type your search key word in textbox i.e 'Announcement' and press enter.

now you can find the search results( results are showing in searchcenter site which was created and specified in search settings).

17. if you add new document and try for that document in search it wont display that document in search result. we need to crawl content source then only that document available for search.

Now am going to show add new document and how to make it available for search.

a. added one document to shared document. i.e "searchsettingdoc.txt"

b. Go to central administration -->application management services-->search service application -->Content Sources under Crawling.

c. select your content source and select 'Start Incremental Crawl'. it will start incremetal crawl.

d. after completion of incremental crawl go to your site and search for your newly added document now..





That's it......

No comments:

Post a Comment