Partilhar via


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

Remarks

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

See Also

Reference

SearchServiceApplication Class

SearchServiceApplication Members

Microsoft.Office.Server.Search.Administration Namespace