ALIYUN::SLS::Index is used to create an index for a specified Logstore.
Syntax
{
"Type": "ALIYUN::SLS::Index",
"Properties": {
"ProjectName": String,
"FullTextIndex": Map,
"LogstoreName": String,
"KeyIndices": List,
"LogReduce": Boolean
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ProjectName | String | Yes | No | The name of the Log Service project. | The name must be 3 to 36 characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must start with a lowercase letter or digit. |
FullTextIndex | Map | Yes | Yes | The full-text index configurations. | For more information, see FullTextIndex properties. |
LogstoreName | String | Yes | No | The name of the Logstore. | None |
KeyIndices | List | No | Yes | The field index configurations. | You must specify at least one of the FullTextIndex and KeyIndices parameters. For more information, see Properties. |
LogReduce | Boolean | No | Yes | Specifies whether to enable LogReduce. | Default value: false. Valid values:
|
FullTextIndex syntax
"FullTextIndex": {
"CaseSensitive": Boolean,
"Delimiter": String,
"IncludeChinese": Boolean,
"Enable": Boolean
}
FullTextIndex properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Enable | Boolean | Yes | Yes | Specifies whether to enable full-text indexing. | Default value: true. Valid values:
|
CaseSensitive | Boolean | No | Yes | Specifies whether the field is case-sensitive. | Default value: false. Valid values:
|
Delimiter | String | No | Yes | The delimiter that is used to separate keywords. | Valid values:
|
IncludeChinese | Boolean | No | Yes | Specifies whether to support Chinese word segmentation. | Default value: false. Valid values:
|
KeyIndices syntax
"KeyIndices": [
{
"Name": String,
"EnableAnalytics": Boolean,
"Delimiter": String,
"CaseSensitive": Boolean,
"JsonKeyIndices": List,
"Alias": String,
"IncludeChinese": String,
"Type": String
}
]
KeyIndices properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Name | String | Yes | Yes | The name of the field. | You can use a nested name that is separated with periods (.). Example: k1.k2.k3. |
EnableAnalytics | Boolean | No | Yes | Specifies whether to enable statistical analysis on the field. | Default value: true. Valid values:
|
Delimiter | String | No | Yes | The delimiter that is used to separate keywords. | Valid values:
|
CaseSensitive | Boolean | No | Yes | Specifies whether the field is case-sensitive. | Default value: false. Valid values:
|
JsonKeyIndices | List | No | Yes | The JSON index configurations. Format: [{"key1": "value1", "key2": "value2", ...}] . |
Supported keys are Name, Alias, Type, and EnableAnalytics. For more information, see JsonKeyIndices properties. |
Alias | String | No | Yes | The alias of the field. | None |
IncludeChinese | Boolean | No | Yes | Specifies whether to support Chinese word segmentation. | Default value: false. Valid values:
|
Type | String | Yes | Yes | The type of the field. | Default value: text. Valid values:
|
JsonKeyIndices syntax
"JsonKeyIndices": [
{
"Type": String,
"Alias": String,
"EnableAnalytics": Boolean,
"Name": String
}
]
JsonKeyIndices properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Name | String | Yes | Yes | The name of the field. | None |
EnableAnalytics | Boolean | No | Yes | Specifies whether to enable statistical analysis on the field. | Valid values:
|
Alias | String | No | Yes | The alias of the field. | None |
Type | String | Yes | Yes | The type of the field. | None |
Response parameters
Fn::GetAtt
None
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Description": "Test SLS Index", "Parameters": { }, "Resources": { "LogIndex": { "Type": "ALIYUN::SLS::Index", "Properties": { "ProjectName": "TestProject", "FullTextIndex": { "CaseSensitive": true }, "LogstoreName": "TestLogstore" } } }, "Outputs": { } }