Scope with content source rule

September 10, 2009 at 9:34 am Leave a comment

I’am creating a feature that setups  the search settings for a project. The feature creates some content sources and scopes. I discoverd that there is no method for adding a rule type ‘Content Source’ on the Scope.  The following create rule methods are availble:

  • CreateAllContetRyle
  • CreatePropertyQueryRule
  • CreateUrlRule

I expected a method like ‘CreateContentSourceRule’, like the user interface offers. Using reflector I dissabled the page page and found out that a new Content Source rule is created using the CreatePropertyQueryRule:

scope.Rules.CreatePropertyQueryRule(ScopeRuleFilterBehavior.Invlude, managedProperties.[“ContentSource”], “yourconcentsourcename”);


Entry filed under: SharePoint Development.

The SharePoint Traffic Light Model

Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Recent Posts

Twitter Updates

%d bloggers like this: