Queries the results of term weight analysis for a search query.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

GET /v4/openapi/intervention-dictionaries/[name]/term-weighting-results HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
name String Path Yes test

The name of the intervention dictionary.

query String Query Yes test

The search query for which you want to perform term weight analysis.

analyzerName String Query No test1

The analyzer that is used to segment the search query.

Response parameters

Parameter Type Example Description
requestId String 001642BA-662A-C703-F665-38AA70673339

The ID of the request.

result Array of item

The results of term weight analysis for the search query.

token String mysql

The term.

weight Integer 7

The weight.

Examples

Sample requests

GET /v4/openapi/intervention-dictionaries/test/term-weighting-result?query=database management&analyzerName=test1

Sample success responses

XML format

<requestId>001642BA-662A-C703-F665-38AA70673339</requestId>
<result>
    <token>mysql</token>
    <weight>7</weight>
</result>
<result>
    <token>data </token>
    <weight>4</weight>
</result>
<result>
    <token>base</token>
    <weight>4</weight>
</result>
<result>
    <token>management</token>
    <weight>4</weight>
</result>

JSON format

{
    "requestId": "001642BA-662A-C703-F665-38AA70673339",
    "result": [
        {
            "token": "mysql",
            "weight": 7
        },
        {
            "token": "data",
            "weight": 4
        },
        {
            "token": "base",
            "weight": 4
        },
        {
            "token": "management",
            "weight": 4
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.