The DataCollection object represents a data collection task in an OpenSearch application. Data collection captures user behavior and item information from your application, enabling OpenSearch to deliver personalized search results and analytics.
Example
{
"id": "286",
"name": "os_function_test_v1",
"type": "server",
"status": 2,
"dataCollectionType": "BEHAVIOR",
"industryName": "GENERAL",
"created": 1581065837,
"updated": 1581065904,
"sundialId": "1755"
}In this example, status: 2 means the data collection feature is enabled, and dataCollectionType: "BEHAVIOR" means the task collects behavioral data.
Fields
| Field | Type | Description |
|---|---|---|
id | String | The ID of the data collection task. |
name | String | The name of the data collection task. |
type | String | The source type from which data is collected. Valid values: server, web, app. Note: Only server is supported. |
status | Integer | The status of the data collection feature. See Status values. |
dataCollectionType | String | The type of data to collect. Valid values: BEHAVIOR, item_info, industry-specific. |
industryName | String | The industry type. Valid values: GENERAL, ecommerce. |
sundialId | String | The ID of the internal sundial scheduling system. |
created | Integer | The time when the data collection task was created. |
updated | Integer | The time when the data collection task was last updated. |
Status values
The status field reflects the lifecycle of a data collection task:
| Value | Meaning | Description |
|---|---|---|
0 | Not enabled | The data collection feature has not been enabled. |
1 | Enabling | The feature is being enabled. This is a transitional state. |
2 | Enabled | The feature is active and collecting data. |
3 | Failed | The feature failed to enable. Check your configuration and try again. |
Normal flow: 0 (not enabled) → 1 (enabling) → 2 (enabled)
Error path: 0 → 1 → 3 (failed)
Data collection types
The dataCollectionType field determines what kind of data the task collects:
| Value | Description |
|---|---|
BEHAVIOR | Behavioral data. |
item_info | Item information. |
industry-specific | Industry-specific information tailored to the selected industry. |
该文章对您有帮助吗?