< Home

weight

Function

The weight command configures the weight of a user-defined keyword.

The undo weight command restores the default weight value of a user-defined keyword. The default value is 1.

Format

weight weight-value

undo weight

Parameters

Parameter Description Value
weight weight-value Specifies the weight value of a user-defined keyword. The value is an integer ranging from 1 to 255. The default value is 1.

Views

User-defined keyword view

Default Level

2: Configuration level

Usage Guidelines

The weight value represents the confidentiality and importance of a keyword. The higher the weight value, the more important the keyword. The device calculates the sum weights of all keywords based on the number of times the keywords appear in the data to be detected.

Example

# Set the weight value of the user-defined keyword def to 10.

<sysname> system-view
[sysname] keyword-group name abc
[sysname-keyword-group-abc] user-defined-keyword name def
[sysname-keyword-group-abc-keyword-def] weight 10
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >