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

Namespace: CMS.Search
Assembly: CMS.Search (in CMS.Search.dll) Version: 10.0.0
Syntax
C#
public static void CreateTask(
	SearchTaskTypeEnum taskType,
	string objectType,
	string objectField,
	string objectValue,
	int objectID,
	Nullable<bool> runIndexer = 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.
See Also