SynonymCollection.AddSynonym Method (String, String, String, Nullable<DateTime>, Nullable<DateTime>)
Adds a two-way synonym with the specified name, term, description and date range 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 AddSynonym ( _
synonym As String, _
term As String, _
description As String, _
start As Nullable(Of DateTime), _
end As Nullable(Of DateTime) _
) As Synonym
'Usage
Dim instance As SynonymCollection
Dim synonym As String
Dim term As String
Dim description As String
Dim start As Nullable(Of DateTime)
Dim end As Nullable(Of DateTime)
Dim returnValue As Synonym
returnValue = instance.AddSynonym(synonym, _
term, description, start, end)
Synonym AddSynonym(
string synonym,
string term,
string description,
Nullable<DateTime> start,
Nullable<DateTime> end
)
Parameters
synonym
Type: System.StringThe synonym name.
term
Type: System.StringThe synonym term.
description
Type: System.StringThe synonym description.
start
Type: System.Nullable<DateTime>The date from which the synonym is valid.
end
Type: System.Nullable<DateTime>The date to which the synonym is valid.
Return Value
Type: Microsoft.SharePoint.Search.Extended.Administration.Keywords.Synonym
A Synonym representing the added synonym.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If the synonym name is [null]. |
AdminException | If the synonym name is already used by another synonym for the keyword. |
AdminException | If the synonym name is already used by another keyword. |
See Also
Reference
Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace