Modifies a fine sort expression that is configured for a version of an OpenSearch application. If you set the dryRun parameter to true, this operation checks the specified fine sort expression after the expression is modified. The default value of the dryRun parameter is false if you do not set this parameter.

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

PUT /v4/openapi/app-groups/[appGroupIdentity]/apps/[appId]/second-ranks/[name] HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
appGroupIdentity String Path Yes "my_app_group_name"

The name of the application.

appId Integer Path Yes 110157886

The ID of the version.

name String Path Yes true

The name of the fine sort expression.

dryRun Boolean Query No true

Specifies whether the request is a dry run.

Request body

Parameter

Type

Required

Example

Description

meta

String

No

"text_relevance(name)"

The content of the expression.

description

String

No

"my_test"

The description of the expression.

active

Boolean

No

true

Specifies whether the expression is the default one.

Response parameters

Parameter Type Example Description
requestId String C5E2F73C-8241-81F8-3A62-65478C5A3111

The ID of the request.

result Struct

The information about the fine sort expression.

active Boolean true

Indicates whether the expression is the default one.

created Integer 1
description String "11"

The description of the expression.

id String 890473

The ID of the expression. This parameter appears only in the response.

isDefault String true

Indicates whether the expression is the default one. This parameter appears only in the response. Valid values:

  • true
  • false
isSys String false

Indicates whether the expression is a system expression. This parameter appears only in the response. Valid values:

  • true
  • false
meta String cate_id > 0 and cate_id < 1000

The content of the fine sort expression.

You can define an expression that consists of fields, feature functions, and mathematical functions to implement complex sort logic.

name String lsh_second_1

The name of the expression.

updated Integer 1

Examples

Sample requests

PUT /v4/openapi/app-groups/os_function_test_v1/apps/150024378/second-ranks/name_relevance

{
    "meta": "text_relevance(name)",
    "description": "123",
    "active": true
}

Sample success responses

XML format

<requestId>C5E2F73C-8241-81F8-3A62-65478C5A3111</requestId>
<result>
    <id>890473</id>
    <name>name_relevance</name>
    <meta>text_relevance(name)</meta>
    <active>true</active>
    <description>123</description>
    <created>1593679894</created>
    <updated>1593679894</updated>
    <isDefault>true</isDefault>
    <isSys>false</isSys>
</result>

JSON format

{
    "requestId": "C5E2F73C-8241-81F8-3A62-65478C5A3111",
    "result": {
        "id": 890473,
        "name": "name_relevance",
        "meta": "text_relevance(name)",
        "active": true,
        "description": 123,
        "created": 1593679894,
        "updated": 1593679894,
        "isDefault": true,
        "isSys": false
    }
}

Error codes

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