All Products
Search
Document Center

OpenSearch:CreateInterventionDictionary

Last Updated:Mar 03, 2024

Create an intervention dictionary.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
opensearch:WriteInterventionDictionary
  • InterventionDictionary
    acs:opensearch:{#regionId}:{#accountId}:intervention-dictionaries/*
    none
none

Request syntax

POST /v4/openapi/intervention-dictionaries

Request parameters

ParameterTypeRequiredDescriptionExample
dryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Default value: false.

Valid values:

  • true
  • false
false
bodyobjectNo

The request body.

namestringNo

The name of the intervention dictionary.

ner_dict_ec
typestringNo

The type of the intervention dictionary. Valid values:

  • stopword: an intervention dictionary for stop word filtering.
  • synonym: an intervention dictionary for synonym configuration.
  • correction: an intervention dictionary for spelling correction.
  • category_prediction: an intervention dictionary for category prediction.
  • ner: an intervention dictionary for named entity recognition (NER).
  • term_weighting: an intervention dictionary for term weight analysis.
  • suggest_allowlist: a drop-down suggestion whitelist.
  • suggest_denylist: a drop-down suggestion blacklist.
  • hot_allowlist: a top search whitelist.
  • hot_denylist: a top search blacklist.
  • hint_allowlist: a hint whitelist.
  • hint_denylist: a hint blacklist.
ner
analyzerTypestringNo

The type of the analyzer. Valid values:

  • MODEL: model-based custom analyzer.
  • SYSTEM: system analyzer.
  • USER: custom analyzer.
SYSTEM

Request body

ParameterTypeRequiredExampleDescription
nameStringYes"my_dict"The name of the intervention dictionary.
typeStringYes"ner"The type of the intervention dictionary.
analyzerStringNo"my_analyzer"The name of the custom analyzer. This parameter is required if type is set to ner.
analyzerTypeStringNo"SYSTEM"The type of the analyzer.

For more information, see InterventionDictionary .

Response parameters

ParameterTypeDescriptionExample
object
requestIdstring

The ID of the request.

80326EFE-485F-46E7-B291-5A1DD08D2198
resultobject

The returned results.

createdstring

The time when the test scenario was created.

1591086323
analyzerstring

The custom analyzer.

dianshang
updatedstring

The time when the intervention dictionary was last updated.

1591086323
typestring

The type of the intervention dictionary. Valid values:

  • stopword: an intervention dictionary for stop word filtering
  • synonym: an intervention dictionary for synonym configuration
  • correction: an intervention dictionary for spelling correction
  • category_prediction: an intervention dictionary for category prediction
  • ner: an intervention dictionary for named entity recognition (NER)
  • term_weighting: an intervention dictionary for term weight analysis
ner
namestring

The name of the test group.

testb

Examples

Sample success responses

JSONformat

{
  "requestId": "80326EFE-485F-46E7-B291-5A1DD08D2198",
  "result": {
    "created": "1591086323",
    "analyzer": "dianshang",
    "updated": "1591086323",
    "type": "ner",
    "name": "testb"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-05-24The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: dryRun
    Added Input Parameters: body