Click or drag to resize
SearchTaskInfoProvider.CreateTask Method (SearchTaskTypeEnum, String, String, String, Int32, Nullable<Boolean>, 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.Search.SearchTaskTypeEnum
Task type
objectType
Type: System.String
Object type. Not required for rebuild or optimize tasks.
objectField
Type: System.String
Object field
objectValue
Type: System.String
Object value
objectID
Type: System.Int32
ID of an object this task relates to, 0 if there is none
runIndexer (Optional)
Type: System.Nullable<Boolean>
Whether indexer starts after creation. If not specified this behavior depends on current settings.
indexerName (Optional)
Type: System.String
Indexer name when the indexer is not register with the objectType.
See Also