Click or drag to resize
SearchTaskInfoProviderCreateTask Method (SearchTaskTypeEnum, String, String, String, Int32, NullableBoolean, String)
Creates task in the database and start indexer if it is required.

Namespace: CMS.Search
Assembly: CMS.Search (in CMS.Search.dll) Version: 13.0.131
Syntax
C#
public static void CreateTask(
	SearchTaskTypeEnum taskType,
	string objectType,
	string objectField,
	string objectValue,
	int objectID,
	Nullable<bool> runIndexer = null,
	string indexerName = null
)

Parameters

taskType
Type: CMS.SearchSearchTaskTypeEnum
Task type
objectType
Type: SystemString
Object type. Not required for rebuild or optimize tasks.
objectField
Type: SystemString
Object field
objectValue
Type: SystemString
Object value
objectID
Type: SystemInt32
ID of an object this task relates to, 0 if there is none
runIndexer (Optional)
Type: SystemNullableBoolean
Whether indexer starts after creation. If not specified this behavior depends on current settings.
indexerName (Optional)
Type: SystemString
Indexer name when the indexer is not register with the objectType.
See Also