k blog.kenaro.com
← All articles

Exclude Asset Library from search results by modifying search scopes

· Ingo Karstein

It’s possible to exclude SharePoint Lists from search results by excluding their types in the search scope definition.

Therefore you need to define an search scope rule based on a “property”. You have to use “contentclass” and a value.

There are much lists of the possible values out in the web.

Here is mine :-)

ValueDescription
STS_WebSite
STS_ListCustom List
STS_ListItemCustom List item
STS_List_DocumentLibraryDocument Library
STS_ListItem_DocumentLibraryDocument Libary item
STS_List_LinksLink List
STS_ListItem_LinksLink List item
STS_List_EventsEvent List
STS_ListItem_EventsEvent List item
STS_List_TasksTask List
STS_ListItem_TasksTask List item
STS_List_ContactsContact List
STS_ListItem_ContactsContact List item
STS_List_AnnouncementsAnnouncements List
STS_ListItem_AnnouncementsAnnouncements List item
STS_List_DiscussionBoardDiscussion Board
STS_ListItem_DiscussionBoardDiscussion Board item
STS_List_GanttTasksGantt Task List
STS_ListItem_GanttTasksGantt Task item
STS_List_IssueTrackingIssue Tracking list
STS_ListItem_IssueTrackingIssue Tracking item
STS_List_SurveySurvey
STS_ListItem_SurveySurvey item
STS_List_PictureLibraryPicture Library
STS_ListItem_PictureLibraryPicture Library Item
STS_List_WebPageLibraryWeb Page Library
STS_ListItem_WebPageLibraryWeb Page Library Item
STS_List_XMLForm(InfoPath) Form Library
STS_ListItem_XMLForm(InfoPath) Form Library item
STS_List_850Page Library
STS_ListItem_850Page Library item
urn:content-class:SPSSearchQuerySearch Query
urn:content-class:SPSListing:NewsNews Listing
urn:content-class:SPSPeoplePeople
urn:content-classes:SPSCategoryCategory
urn:content-classes:SPSListingListing
urn:content-classes:SPSPersonListingPerson Listing
urn:content-classes:SPSTextListingText Listing
urn:content-classes:SPSSiteListingSite Listing
urn:content-classes:SPSSiteRegistrySite Registry Listing

You can generally exclude list items from search by using the value “STS_ListItem_PictureLibrary” for the property “contentclass”.

But how to exclude items or lists of type “Asset Library” which is also a standard list template like “Document Library”, “Picture Library”, “Calendar List”, … and “Page Library” which has as code (850) as name. (Marked red in the list above.)

I checked the 14 hive and figured out the 850 is the list template ID of “Page Library”. And the list template ID of “Asset Library” is 851.

So I used the following query in the search box: “(scope:“All Websites”) (contentclass:STS_List_851)”

I created a new search scope exclude rule on the site collection using “STS_List_851” in it worked! Now there are no more Asset Libary links in the search result. If you you “STS_ListItem_851” you can exclude Asset Library Litems.

(No screenshots today, sorry!)

1 comment

Vijay Burali Jul 24, 2014
Hi Karstein, Even after using "STS\_ListItem\_851" with Exclude condition i am getting ".../SiteAsets/TestPage.aspx" document. Please can u help me out for this. Thanks for your helpful post.:) Regards Vijay

Leave a comment

Your comment is reviewed before it appears. Your name is shown with the comment; your email is required for moderation but never published.