How to index SharePoint Portal Server 2003 list items in SharePoint Server 2007

Article translations Article translations
Article ID: 937884 - View products that this article applies to.
Expand all | Collapse all

INTRODUCTION

This article describes how to index Microsoft Office SharePoint Portal Server 2003 list items in Microsoft Office SharePoint Server 2007.

By default, SharePoint Server 2007 does not have an option to index SharePoint Portal Server 2003 list items. To index SharePoint Portal Server 2003 list items in SharePoint Server 2007, add a content source, and then create a crawl rule that points to the server that is running SharePoint Portal Server 2003. Then, use the SharePoint Server 2007 object model to set the ContentClass property of the crawl rule to a value of 0 (zero).

MORE INFORMATION

To index SharePoint Portal Server 2003 list items in SharePoint Server 2007, follow these steps.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
  1. Start SharePoint 3.0 Central Administration.
  2. Create a content source that points to the server that is running SharePoint Portal Server 2003. To do this, follow these steps:
    1. Click Application Management, and then click Create or configure this farm's shared services under OfficeSharePoint Server Shared Services.
    2. Click the Shared Service Provider (SSP) that you want to configure.
    3. On the Home page, click Search settings under Search.
    4. On the Configure Search Settings page, click Content sources and crawl schedules under Crawl Settings.
    5. On the Manage Content Sources page, click New Content Source.
    6. On the Add Content Source page, specify the settings for the content source, and then click OK.

      Notes
      • Make sure that you specify the server that is running SharePoint Portal Server 2003.
      • Use the default settings for the other options on the page.
      • By default, the crawl settings use the Crawl everything under the hostname for each start address option. If you set the crawl settings to use the Crawl only the SharePoint Site of each start address option, SharePoint Server 2007 will not crawl SharePoint Portal Server 2003 list items. This behavior occurs because the Crawl only the SharePoint Site of each start address option overrides the ContentClass property setting.
  3. Create a crawl rule that points to the server that is running SharePoint Portal Server 2003. To do this, follow these steps:
    1. Click Shared Services Administration, and then click the Shared Service Provider (SSP).
    2. On the Home page, click Search settings under Search.
    3. On the Configure Search Settings page, click Crawl rules under Crawl Settings, and then click New Crawl Rule.
    4. On the Add Crawl Rule page, specify the settings for the crawl rule. When you specify the settings, make sure that you do the following:
      • Specify the path of the server that is running SharePoint Portal Server 2003 in the Path box.
      • Click to select the Crawl complex URLs (URLs that contain a question mark (?)) check box.
  4. Create a Microsoft Windows-based application that sets the ContentClass property of the crawl rule to a value of 0 (zero). The following is sample code that does this. This sample code creates a Windows form that contains a text box that is named SSPPath, a crawl rule text box that is named CrawlPathText, and a button that is named button1.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using Microsoft.Office.Server.Search.Administration;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Portal;
    using System.Web;
    using Microsoft.Office.Server;
    
    namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                if (SSPPath.Text != "" && CrawlPathText.Text != "")
                {
                    try
                    {
                        SPSite site = new SPSite(SSPPath.Text);
    
                        SearchContext.GetContext(site);
                        Content content = new Content(SearchContext.GetContext(site));
    
                        CrawlRule rule = content.CrawlRules.Test(CrawlPathText.Text);
    
                        if (rule != null)
                        {
                            rule.ContentClass = "0";
                            rule.Update();
                            MessageBox.Show("ContentClass was set to: " + rule.ContentClass.ToString());
                        }
                        else
                        {
                            MessageBox.Show("There was a problem. Make sure the Crawl path is correct.");
                            CrawlPathText.Focus();
                        }
    
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message.ToString());
                        SSPPath.Focus();
                    }
                }
                else
                {
                    MessageBox.Show("Need to enter a SharedServices Path as well as the name to a Crawl Path");
                    SSPPath.Focus();
                }
            }
        }
    }
    
    Note When you compile and then run the application, do the following:
    • Set the SSPPath box to http://ShareServices_HostName:Port
    • Set the CrawlPathText box to the path that you specified for the crawl rule that you created in step 3. For example, set the path to http://PortalSiteName/*.

REFERENCES

For more information about the SharePoint Server 2007 object model, see the Microsoft Office SharePoint Server 2007 software development kit (SDK). To view the SharePoint Server 2007 SDK, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/library/ms550992.aspx
Or, to download the SharePoint Server 2007 SDK, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en

Properties

Article ID: 937884 - Last Review: June 6, 2007 - Revision: 1.1
APPLIES TO
  • Microsoft Office SharePoint Server 2007
  • Microsoft Office SharePoint Portal Server 2003
Keywords: 
kbhowto kbinfo kbexpertiseinter KB937884

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com