SharePoint 2007 Search Scopes
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
People: urn:content-class:SPSPeople
Category: urn:content-classes:SPSCategory
Listing: urn:content-classes:SPSListing
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
Site: STS_Web
List: STS_List
List Item: STS_ListItem
Events: STS_List_Events
Tasks: STS_List_Tasks
Announcements: STS_List_Announcements
Discussions: STS_List_DiscussionBoard
Contacts: STS_List_Contacts
Links: STS_List_Links
Document Library: STS_List_DocumentLibrary
Document Library Items: STS_ListItem_DocumentLibrary
Picture Library: STS_List_PictureLibrary
Picture Library Items: STS_ListItem_PictureLibrary
I need to do the opposite. I need to create a search scope for a specific document library.
Thanks,
Ninel