Preparing an MCMS Website for Search with SharePoint - Configuring SharePoint Portal Server Search
(Page 3 of 4 )
With our MCMS site ready for indexing, we now turn to SPS. First, we will configure SharePoint to index our Tropical Green site. After creating the index, we'll create a source group that will contain the content source. Source groups are used to group content sources together in a logical collection. In our case, we'll have a single content source in our source group. The source group is what we'll reference when we create our search logic in the Tropical Green site.
The next few steps assume you've created a portal in SPS. Refer to Appendix A, Setting up MCMS and SPS on the Same Virtual Server, for instructions on how to create a portal.
While Appendix A details how to configure a virtual server to host an MCMS site and SharePoint portal at the same time, we do not want to do that for this chapter. We need two virtual servers, one for the www.tropicalgreen.net MCMS site and the other for the SharePoint portal.tropicalgreen.net site. Appendix A details how to create a new virtual server and a new SharePoint Portal Server portal.
Creating a New Content Source
The first step in configuring SPS search is to create a content source. One way to accomplish this is to use the SearchSetup.exe command-line tool included with the MCMS Connector. This utility can be found in the MCMS 2002 Connector for SharePoint Technologies\WSS\bin folder. The SearchSetup.exe utility creates the necessary content sources in SharePoint as well as all the site rules to include the root channel and all top-level channels in your site hierarchy in order to include and exclude the appropriate content. For more information on the SearchSetup.exe utility, refer to the help included with the MCMS Connector.
In order to use the MCMS Connector search controls SearchInputControl and SearchResultControl, you need to use the SearchSetup.exe utility to create your content source and source group in your SharePoint portal. This is because the MCMS Connector search controls are hard-coded to look for a specific SharePoint search group named "CMSChannels". To complete the two search examples in this chapter, create two sets of content sources by following the steps in this section using the SearchSetup.exe
utility and by creating the content source manually.
Creating a Content Source with the MCMS Connector Utility
Let's use the MCMS Connector SearchSetup.exe command-line utility to create a new content source and source group:
- Open a command prompt and change the current directory to the following MCMS Connector default utility directory:
cd "C:\Program Files\MCMS Connector for SharePoint Technologies\WSS\Bin"
- Enter the following command to create a new content source that will index our Tropical Green website, using the MCMS guest account to crawl the content, and initiate the crawl immediately after creating the content source (replacing the user and password credentials with your MCMS guest account credentials):
searchsetup.exe -url "http://www.tropicalgreen.net/ TropicalGreen/"
-crawl "1"
-user "<domain>\SearchCrawler"
-password "<password>"
-portalurl "http://portal.tropicalgreen.net"
The table below describes each of the possible switches:
Switch | Description |
url | The MCMS URL that will be used by SharePoint as the start point of the crawl. |
crawl | Indicates whether or not a crawl is performed immediately after SharePoint creates the content source. A value of "1" instructs SharePoint to perform a crawl immediately. Otherwise, set it to a value of "0" to stop SharePoint from crawling the site. |
user | The user account that has access to the MCMS content to be indexed. |
password | Password of the user account. |
portalurl | URL of the SharePoint portal server that will contain the content source. |
You only have to run this command-line program once, not every time you update the site. If you need to perform a full crawl of the site again, you can do so by resetting the content source and executing a full crawl. Refer to the SharePoint Portal Server documentation for more information on this.
Now that we have a new content source created, let's create a new search scope to make it easier to test our search results.
Next: Creating a New Search Scope >>
More Windows Scripting Articles
More By PACKT Publishing
|
This article is excerpted from chapter five of the book Advanced Microsoft Content Management Server Development, written by Lim Mei Ying et al. (PACKT, 2005; ISBN: 1904811531). Check it out today at your favorite bookstore. Buy this book now.
|
|