RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Using SharePoint Portal Server to Index Your Custom Application : Page 4

Although you can plumb the depths of SharePoint's search engine, creating custom protocol handlers and IFILTERs to handle your site's custom search needs, for most sites, you can follow a much simpler process to provide customized searches.

Considerations for Indexing Your Site
A few quick considerations when enabling indexing for your custom application:

  • SharePoint supports only HTTP-based authentication. If your application relies upon forms-based authentication to validate users, you will have to devise another means of validation.
  • The gatherer will index the content only one time, and once indexed, that content will be available for everyone via search. You do not want to index information that is sensitive or should be available only to certain users.
  • The gatherer's job is to gather and index content as quickly as possible. This often creates a load higher than most people can reasonably test. Be prepared for a massive load generated on the custom application when SharePoint is indexing the site. In fact, we've used search engines like SharePoint to do initial load testing for us.
Configuring SharePoint
Once you have created your pages, you need to configure SharePoint Portal Server to index them, a process that involves setting up a new content source, content index, and search scope. The following sections list the steps you should follow.

Creating a Content Index
The Content Index is the database that will hold the indexed information. Follow these steps to create the Content Index.

  1. From the portal home page, click Site Settings.
  2. From the site settings page in the Search Settings and Indexed Content section, click Configure Search and Indexing.
  3. If you see a link, Enabled Advanced Search Administration Mode, click it to enable the features necessary to complete this process.
  4. Scroll down on the Configure Search and Indexing page to the Content Indexes section and click the Add Content Index link.
  5. On the Create Content Index page, enter a meaningful name, description, and a source group. The source group is a grouping for naming purposes; generally, naming this the same as the index name is appropriate. Finally, select the server to perform the indexing and click OK.
Creating a Content Source
The content source is the starting point where SharePoint will begin the gathering process. Follow these steps to create the content source.

  1. Click the Configure Search and Indexing breadcrumb link.
  2. On the Configure Search and Indexing page, in the Other Content Sources section, click the Add Content Source link.
  3. Select the content index you created above in the Select a Content Index drop-down box. Click the next button.
  4. Enter the URL for the home page of your custom application, enter a description, and select the source group you created for the Content index. Click the Finish button.
After creating the content source, SharePoint returns you to the content index properties page. Now you can configure the content index so that it only indexes your application.

Configuring the Content Index
Configuring the content index is the process of setting rules that tell the indexer how to handle the content that it finds. Follow these steps to configure the content index.

  1. On the Manage Index Properties page, in the Rules to Exclude and Include Content section, click the Manage Rules to Exclude and Include Content link.
  2. Click the New Rule link or icon.
  3. Enter the path of the application to index, ending with a slash (/) and an asterisk (*), click the Include Complex URLs (URLs That Contain Question Marks (?)) link, and click the OK button.
  4. Hover over the server name of the newly added URL and then select the context menu from the drop down on the right. Click the Move Up option from the context menu.
Now that the content index and content source have been setup and configured, there is only one more step—which is technically optional. That step is to create a new search scope.

New Search Scope
SharePoint uses search scopes to display information to users searching through the portal's Web interface. By creating a search scope, you make it possible to search your custom application separately from any other content that SharePoint has indexed. For example, you would create a new search scope to make your custom application searchable separately from all other documents on the network. Another good reason to create a search scope is if the part numbers, order numbers, or other key identifiers that people use to search your custom application also appear elsewhere on the network. Providing a search scope isolates your application's search results from that other information, helping prevent confusion as to where the best place is to get information about the items associated with that identifier.

To create a new search scope, follow these steps:

  1. On the Exclude and Include content page, click the Configure Search and Indexing breadcrumb link.
  2. On the Configure Search and Indexing page in the General Content Settings and Indexing Status, click the Manage Search Scopes link.
  3. On the Manage Search Scopes page, click the New Search Scope link or icon.
  4. Enter the name for the search scope, click the Include No Topic Or Area In This Scope radio button, click the Limit The Scope To The Following Groups Of Content Sources radio button, click the check box next to the source group that you created above, and click the OK button.
  5. Start a command prompt and run the IISRESET command to restart IIS. That causes the new search scope show up immediately.
After creating the new search scope, you'll be able to search for information within that scope from the portal. Before you can do that, however, you must first perform the indexing process.

Starting the Gathering Process
Before you can search, the gatherer has to index your application. Here are the steps to kick off the gathering process, which will create the index of your application.

  1. On the Manage Search Scopes page, click the Site Settings breadcrumb link.
  2. On the Site Setting page in the Search Settings and Indexed Content section, click the Configure Search and Indexing link.
  3. On the Configure Search and Indexing page in the Content Indexes section, click the Manage Content Indexes link.
  4. Hover over the content index you created above, select the drop down on the right hand side of the name, and click Start Full Update from the menu.
Over the next few minutes, the page will automatically refresh, showing you the status of your new index. You can search your custom application from within the portal after that page returns to idle again and displays the number of documents in the index.

So Little Time for So Much Information
For smaller applications, you can create a search index in only a few minutes that corresponds to the information in your application, enhancing it by providing a way for users to perform a full text search, or simply providing people already using SharePoint Portal Server with a single location to perform searches. For larger applications, the effort required to implement SharePoint indexing varies; but in most cases, setting up the index takes only a few hours of time and can greatly improve people's ability to find information.

Robert Bogue, MCSE (NT4/W2K), MCSA:Security, A+, Network+, Server+, I-Net+, IT Project+, E-Biz+, CDIA+ has contributed to more than 100 book projects and numerous other publishing projects. He was recently honored to become a Microsoft MVP for Microsoft Commerce Server and before that Microsoft Windows Servers-Networking. Robert blogs at http://www.thorprojects.com/blog.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date