Share via


PromotedItemCollection.AddPromotedExpression Method

Creates a promoted expression and adds it to the collection.

Namespace:  Microsoft.SharePoint.Search.Extended.Administration.Keywords
Assembly:  Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)

Syntax

'Declaration
Function AddPromotedExpression ( _
    fqlExpression As String _
) As PromotedExpression
'Usage
Dim instance As PromotedItemCollection
Dim fqlExpression As String
Dim returnValue As PromotedExpression

returnValue = instance.AddPromotedExpression(fqlExpression)
PromotedExpression AddPromotedExpression(
    string fqlExpression
)

Parameters

  • fqlExpression
    Type: System.String

    The FQL (Fast Query Language) expression for promoting result set items.

Return Value

Type: Microsoft.SharePoint.Search.Extended.Administration.Keywords.PromotedExpression
A PromotedExpression representing the added promoted expression.

Exceptions

Exception Condition
ArgumentNullException

The [fqlExpression] is [null].

AdminException

The add operation.fails. An example of an add operation that will fail is adding an already existing promoted item to the collection.

See Also

Reference

PromotedItemCollection Interface

PromotedItemCollection Members

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace