1 minute read
I recently needed to create a Search Scope in MOSS that returned only sites that matched the search term. In this case, there was one site per customer account, and we wanted to be able to find each customer’s site quickly using search.
After some poking about, I found this article on MSDN that explained what to use for contentclass in a Search Scope programmatically to limit the results appropriately: STS_WEB.
So to implement this, create a new Search Scope and add a rule. Choose a Property Query, where contentclass=STS_Web.
The other options for contentclass are listed below. Note that there is some inconsistency in the way the various contentclasses are described.
Search Query: urn:content-class:SPSSearchQuery
News Listing: urn:content-class:SPSListing:News
Person Listing: urn:content-classes:SPSPersonListing
Text Listing: urn:content-classes:SPSTextListing
Site Listing: urn:content-classes:SPSSiteListing
Site Registry Listing: urn:content-classes:SPSSiteRegistry
List Item: STS_ListItem
Document Library: STS_List_DocumentLibrary
Document Library Items: STS_ListItem_DocumentLibrary
Picture Library: STS_List_PictureLibrary
Picture Library Items: STS_ListItem_PictureLibrary