19 January 2011

Steps to search a single document library

Side Note: This must be done at the site collection level or administration level. Also, you must have full control of your site collection.
Step 1: Go to "Site Actions", "Site Settings" and under "Site Collection Administration" click on "Search Scopes".

Step 2: Click on "New Scope" and give it a title. Usually the document library you wish to search. Click "OK"

Step 3: Now we need to add a rule. Go to the document library you wish to search and grab the URL. Then repeat Step 1 to get back to the search scope settings page. Click on the search scope you created in Step 2. Under the "Rules" section click on "New Rule". Select "Web Address" and enter the URL of your document library. Click "OK".

Step 4: Click on "New Display Group" and give it a title and a description. In the "Scopes" section select the scope you created in Step 2. The "Default Section" should automatically become the scope you selected.

Step 5: Wait for the server to recognize the new scope and display group.

Step 6: Go back to the page you wish to add a search box. Go to "Site Actions", "Edit Page", click on "Add a Web Part". Select the "Search Box" web part and click "Add".

Step 7: The page should be in "Edit Mode". In the "Search Box" web part click on the "edit" button and go to "Modified Shared Web Part".

Step 8: Expand the "Miscellaneous" section. Uncheck "Use site level defaults". In the "Scope Display Group" sub-section the default display group scope will be "Search Dropdown" change this to the display group you created in Step 4. You cannot browse through the display groups so you will have to type your display group in exactly. Click on "OK".

Step 9: Exit out of "Edit Mode". Your search box should now have the new search scope you created in Step 2 as the default choice.
Side Note: Test the search. If it does not work you might need to contact the Site Adminstrator to enable your scope and display group or index(crawl) your document library for the search to work.