03
Nov
10

Limiting the Search Scope using contentclass in a Property Query Scope Rule

If you find yourself needing to limit the scope of a search to only the items in a list (i.e. you don’t want to return any of the view forms and other aspx pages in the search results) you can use the contentclass as part of the search scope definition.  This is a great way to limit the search results to only the content in a list or library.  Use the STS_ListItem_DocumentLibrary string to implement this rule.

There’s a good article on Jose Barreto’s blog that has a list of the contentclass filter strings.  Niels Loup also has good info on this topic.

Basically you are creating a scope rule using a property query and specifying the property restriction of "contentclass" and making it "required."  This scope rule can be combined with others to define what the scope returns.

image

Keywords:

contentclass

Property Query

Scope Rule

SharePoint MOSS 2007 Search

STS_ListItem_DocumentLibrary

Advertisement

1 Response to “Limiting the Search Scope using contentclass in a Property Query Scope Rule”



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Asif Rehmani’s SharePoint Videos

SharePoint-Videos

Click to access a wealth of SharePoint videos

SharePoint Rx

SharePoint Rx Home

Categories

Posts by Date

November 2010
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  
Support Wikipedia

%d bloggers like this: