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.
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.