SearchServiceApplicationProxy.AddRule method

Adds a new Search scope rule to the SearchAdminDatabase.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Public Function AddRule ( _
    ruleInfo As RuleInfo, _
    scopeId As Integer _
) As Integer
'Usage
Dim instance As SearchServiceApplicationProxy
Dim ruleInfo As RuleInfo
Dim scopeId As Integer
Dim returnValue As Integer

returnValue = instance.AddRule(ruleInfo, _
    scopeId)
public int AddRule(
    RuleInfo ruleInfo,
    int scopeId
)

Parameters

  • scopeId
    Type: System.Int32

    The ID of the specified Search scope.

Return value

Type: System.Int32
The ID of the new Search scope rule.

Implements

ISearchSiteAdministrationServiceApplication.AddRule(RuleInfo, Int32)

Exceptions

Exception Condition
Exception

An error, such as a SearchServiceApplicationFault, occurred during application execution.

Remarks

This method adds a new Search scope rule to the specified Search scope to the SearchAdminDatabase.

See also

Reference

SearchServiceApplicationProxy class

SearchServiceApplicationProxy members

Microsoft.Office.Server.Search.Administration namespace