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


SharePoint Applied—Search Your Legacy Data : Page 2

SharePoint 2007 search is extremely extensible and flexible, letting users search multiple data sources through a single interface.

Setting Up the Search
Your content sources are ready, but to search those content sources, you still need to set up a search scope. To do that, under Search Settings, choose View Scopes, and create a new search scope called "Northwind." Go ahead and add the following two rules to it:

Figure 4: Choosing a Northwind Customers rule for the Northwind search scope.
  • Content source: "Milton Excel Sheets"
    Behavior: "Required—Every item in the scope must match this rule."
  • Content source: "Northwind Customers"
    Behavior: "Required—Every item in the scope must match this rule."
You can see the settings for the "Northwind Customers" rule in Figure 4.

Now, from the search settings page, issue an "Update Scopes" command. This will cause the search scopes to update immediately so you don't have to patiently wait another few minutes or so before such an update kicks in automatically.

You're almost done. You need to make this search scope available to a given MOSS Web site. Use the Port 80 site based on the publishing template as the test site for this purpose. You can use the steps below to make the Northwind search scope available on the Port 80 site:

Figure 5: Modifying the Search Dropdown search scopes list.
  • Go to your Port 80 site as an administrator, and then go to Site Settings.
  • Under "Site Collection Administration," click "Search Scopes."
  • Under "Search Scopes" you will now need to add the Northwind search scope to the "Search Dropdown" display group. You can edit this by clicking the rather non-intuitive location as shown in Figure 5.
  • Select the check box for the "Northwind" search scope and make it available to the drop-down control on port 80's search box.
Figure 6: Search results for Maria.
That's it. Go ahead and search the Northwind search scope for "Maria." You can see the results in Figure 6. As you can see, a single search is now able to query both Milton's Excel spreadsheets and the Northwind SQL Server database and present the results in a unified form.

Not only that, there is also an "Alert Me" link, where the end user can set up an alert for any data that might appear in the search results. Remember, you set up an incremental search on Milton's Excel spreadsheets earlier, which means that as Milton enters new data, that new data automatically becomes searchable as SharePoint does an incremental crawl.

Thus, with some clever search configuration, you can now enable the information worker to be alerted via e-mail when data matching a custom search criterion shows up on a file share.

Finally, the information workers don't have to go hunting for the information they need. And you may have noticed that I didn't have to write any C# here either. Quite powerful, I must say!

Sahil Malik Sahil Malik is a Microsoft MVP, INETA speaker, a .NET author, consultant and trainer, and a well-rounded overweight geek. He has a passion for SharePoint 2007, data access, and application architecture. Sahil loves interacting with fellow geeks in real time. His talks are full of humor and practical nuggets. His talks tend to be highly charged, fast moving, and highly interactive. Be sure to check out his blog.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date