Modifies a rough sort expression for a version of an OpenSearch application. If you set the dryRun parameter to true, this operation checks the specified rough sort expression after the expression is modified. The default value of the dryRun parameter is false if you do not set this parameter.
Debugging
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]/first-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 | test |
The name of the rough sort expression. |
dryRun | Boolean | Query | No | true |
Specifies whether the request is a dry run. |
Parameter |
Type |
Required |
Example |
Description |
---|---|---|---|---|
type |
String |
Yes |
"STRUCT" |
The type of the expression. Valid values:
|
meta |
Array or String |
Yes |
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. |
For more information, see FirstRank.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
requestId | String | 0A6EB64B-B4C8-CF02-810F-E660812972FF |
The ID of the request. |
result | Struct |
The information about the rough sort expression. |
|
active | Boolean | true |
Indicates whether the expression is the default one. |
description | String | 1 |
The description of the expression. |
meta | Array of metaItem |
The content of the expression. |
|
arg | String | "1" |
The parameters that are used by a function in the expression. |
attribute | String | static_bm25() |
The attribute, feature function, or field to be searched for. For more information about supported feature functions, see Rough sort functions. |
weight | Float | 10 |
The weight. Valid values: [-100000,100000] (excluding 0). |
name | String | default |
The name of the expression. |
Examples
Sample requests
PUT /v4/openapi/app-groups/os_function_test_v1/apps/150024378/first-ranks/ar_wear_edit_time
{
"type": "STRUCT",
"meta": [
{
"attribute": "timeliness_ms()",
"arg": "ar_edit_time",
"weight": 1
}
],
"description": "",
"active": false
}
Sample success responses
XML
format
<requestId>0A6EB64B-B4C8-CF02-810F-E660812972FF</requestId>
<result>
<name>ar_wear_edit_time</name>
<type>STRUCT</type>
<meta>
<attribute>timeliness_ms()</attribute>
<arg>ar_edit_time</arg>
<weight>1</weight>
</meta>
<description/>
<active>false</active>
<created>0</created>
<updated>0</updated>
</result>
JSON
format
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {
"name": "ar_wear_edit_time",
"type": "STRUCT",
"meta": {
"attribute": "timeliness_ms()",
"arg": "ar_edit_time",
"weight": 1
},
"description": "",
"active": false,
"created": 0,
"updated": 0
}
}
Error codes
For a list of error codes, visit the API Error Center.