Tuesday, February 12, 2008

Sharepoint MOSS 2007 - Enabling Simple Search for an Internet Site

Creating a dedicated, single site search service from the ground up via a MOSS SSP

My goal is to create a new MOSS Site Collection (a web publishing portal) that acts independently of any other sites created on the same server. MOSS Search, unfortunately, searches absolutely everything in your Site Collection by default including the "metadata" sites, like the Search Center. I've seen options for locking down the search scattered all over the place in MOSS, so here I'll be discussing a specific method: how to create a new Shared Service (which controls the search collection) configured specifically for an internet portal site.



Create a New SSP

Lets stick to a naming convention that uses the site name. In this case, we'll create an SSP for a site called "www.bryan.moo". So, our SSP name will have www.bryan.moo in the name and the admin ssp site will piggyback the existing www.bryan.moo site to keep things simple and easy to find.




  1. Goto: Central Administration -> Shared Services Administration -> New SSP

  2. SSP Name
  3. SSP Name: www.bryan.moo_SharedServices

  4. Web Application: Pick the application for www.bryan.moo. I would have named it "Sharepoint - www.bryan.moo80"

  5. My Site Location
  6. Create a new web application for the "My Sites" component using the "Create a new Web application" link. This should -not- be set to the www.bryan.moo application.

  7. SSP Database
  8. Use the default Database Server

  9. Database name: www.bryan.moo_SharedServices_DB

  10. Use windows authentication

  11. Search Database
  12. Use the default Database Server

  13. Database name: www.bryan.moo_search_DB

  14. Use windows authentication

  15. Index Server
  16. Use the defaults

  17. Click OK to create the new SSP. You may get a warning saying that the selected sites will be reassigned to the new SSP. That means that the www.bryan.moo site will change to only use this new SSP for searching, which is exactly what we want. Click "OK" to Continue and wait a few minutes for the setup to complete.



That gets us a dedicated SSP for our internet site, but we still have the task of determining what content we want to show in our search results. MOSS is designed to search all content by default, so we need to tell MOSS what -not- to show in the search results. We'll need to do 2 things for our internet site:


Turn off Search Indexing for the My Sites Site.

Unfortunately, when we created the new SSP, we were also forced to create a new My Sites Server/Site. The new SSP searches that site by default. Since we wont be using that site at all, we need to remove that entire site from the Search Index.

  1. Login to the www.bryan.moo SSP admin (http://www.bryan.moo/ssp/admin)

  2. Goto "Search Settings->content sources and crawl schedules->Local office sharepoint server sites"

  3. Remove the My Sites url's from the "Start Addresses" so that the only url there is our internet site (http://www.bryan.moo)

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


Individually exclude sites from being searched

For example, the Search Center site can show up in your search results...which is probably not very helpful to our users. We can go into the admin page for the search site and specify that the entire Search Center site should not display in search results (From http://www.bryan.moo/Search select Site Actions->Site Settings->Site Administration->Search Visibility). Keep in mind, when you change these settings, you may need to reset all crawled content to get the search hits out of the search index (SSP admin for www.bryan.moo_SharedServices->Search Settings->Reset All Crawled content) ... and then you'll need to start a new crawl for any hits to show up at all.

Now another, possibly better way to go about removing sites from the search results might be to use the SSP search results removal tool (SSP admin for www.bryan.moo_SharedServices->Search Settings->search result removal). You should be able to enter in your url path like "http://www.bryan.moo/Search" to inform the search collection to ignore that url in the search results. Again, I believe you need to reset all crawled content and run a fresh crawl to see these changes kick in.

No comments: