Share via


Category.CreateOrGetCrawledProperty method (String, Boolean, Guid)

Creates or returns a crawled property for a category.

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

Syntax

'Declaration
Public Function CreateOrGetCrawledProperty ( _
    propertyName As String, _
    isNameEnum As Boolean, _
    propset As Guid _
) As CrawledProperty
'Usage
Dim instance As Category
Dim propertyName As String
Dim isNameEnum As Boolean
Dim propset As Guid
Dim returnValue As CrawledProperty

returnValue = instance.CreateOrGetCrawledProperty(propertyName, _
    isNameEnum, propset)
public CrawledProperty CreateOrGetCrawledProperty(
    string propertyName,
    bool isNameEnum,
    Guid propset
)

Parameters

  • propertyName
    Type: System.String

    The name of the crawled property.

  • isNameEnum
    Type: System.Boolean

    A crawled property name that is enumerable.

  • propset
    Type: System.Guid

    The GUID of the property set of the crawled property.

Return value

Type: Microsoft.Office.Server.Search.Administration.CrawledProperty
A CrawledProperty object representing the crawled property that is found or created.

Exceptions

Exception Condition
UnauthorizedAccessException

If the user does not have the required privileges.

DatabaseException

If there was an error querying the database.

CouldNotModifySchemaException

If the schema cannot be added or if the property set is unknown.

InvalidNameException

If this property name is [null] or has an invalid value.

InvalidOperationException

If the crawled property cannot be updated or if the property set is unknown.

See also

Reference

Category class

Category members

CreateOrGetCrawledProperty overload

Microsoft.Office.Server.Search.Administration namespace