Modifies the rough sort expression for an OpenSearch application version. If you set the dryRun parameter to true, this operation validates the modified rough sort expression. The default value of this parameter is false.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
opensearch:WriteFirstRank |
*FirstRank
|
None | None |
Request syntax
PUT /v4/openapi/app-groups/{appGroupIdentity}/apps/{appId}/first-ranks/{name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| appGroupIdentity |
string |
Yes |
The name of the application group. |
my_app_group_name |
| appId |
integer |
Yes |
The ID of the application version. |
110157886 |
| name |
string |
Yes |
The name of the rough sort expression. |
test |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| dryRun |
boolean |
No |
Specifies whether to perform a dry run. |
true |
| body |
FirstRank |
No |
The request body. |
Request body
| Field | Type | Required | Example | Description |
| type | String | Yes | "STRUCT" | The type of the expression. Valid values: - STRUCT: The expression is a structure. This is the default value. - STRING: The expression is a custom formula. |
| meta | Array or String | Yes | Details about the expression. | |
| description | String | No | "my_test" | A description of the rough sort expression. |
| active | Boolean | No | true | Specifies whether the expression is the default one. |
For more information, see FirstRank.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
0A6EB64B-B4C8-CF02-810F-E660812972FF |
| result |
object |
Details about the rough sort expression. |
|
| description |
string |
The description. |
1 |
| active |
boolean |
Indicates whether the expression is the default one. |
true |
| name |
string |
The name of the resource. |
default |
| meta |
array<object> |
Details about the expression. |
|
|
object |
|||
| arg |
string |
The parameters for a function in the expression. |
“1 ” |
| attribute |
string |
The attribute, feature function, or search field. |
static_bm25() |
| weight |
number |
The weight. Valid values: -100000 to 100000. The value cannot be 0. |
10 |
Examples
Success response
JSON format
{
"requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
"result": {
"description": "1",
"active": true,
"name": "default",
"meta": [
{
"arg": "“1 ”",
"attribute": "static_bm25()",
"weight": 10
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.