Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog



Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, Office 365 / SharePoint Online and Visual Studio 2013.

How to: Create a Scope for a custom List Template Type

In Enterprise Search, I often find it useful to create a scope around a specific list template.  This gives users added flexibility in searching only specific lists of documents, list items, pages or whatever.  I think there are a few ways to do this, but one way I have found to do this is by using the List Template Id.  Say you have a simple list template like the following.

<Elements xmlns="">








      DisplayName="My Document Library"

      Description="My Custom Document Library"









To create a scope to only return items that are in this type of list, we use the contentclass managed property.  For built-in list types, you can create a rule in your scope, specifying a property query with a contentclass value of STS_List_Tasks or STS_List_Links for example.  This post has a list of the various built-in values you can use for out-of-the-box list template types.  Configuring a scope for a custom list template type is also pretty easy assuming you know the syntax.  You simply append the type id to STS_ListItem_.  For example, in the case of my list template above, my contentclass would be.


Just go to your SSP –> Search Administration –> Scopes.  Create a new scope and a new rule and then set the Scope Rule Type to Property Query.  Pick contentclass from the box and enter a value like the one above.  Also be sure and select the Require behavior to require items to have that content class.  Here is what it would look like.


EDIT: I need to update the image to show ContentClass instead of Author.

It’s pretty simple.  I am not sure how I figured out how to do this, but it does work.  It might be buried in the SDK somewhere.  I think you could also specify built-in lists using their list template id’s as well.

Follow me on twitter.



How to: Create a Scope for a custom List Template Type - Corey … « said:

Pingback from  How to: Create a Scope for a custom List Template Type - Corey &#8230; &laquo;

March 31, 2009 10:18 PM

ran said:


no matter what STS_* i put i get 0 result .

i have 22000 item crawled.

Any ideas?

July 8, 2010 6:55 AM

Excluding Publishing Image Libraries from Search results said:

Pingback from  Excluding Publishing Image Libraries from Search results

September 11, 2013 2:40 PM

Leave a Comment


About CoreyRoth

Corey Roth is an independent SharePoint consultant specializing in ECM, Apps, and Search.
2015 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems