Modifies a query analysis rule for a version of an OpenSearch application. If you set the dryRun parameter to true, this operation checks the specified query analysis rule. 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]/query-processors/[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 query analysis rule.

dryRun Boolean Query No true

Specifies whether the request is a dry run.

Request body

Parameter

Type

Required

Example

Description

domain

String

No

"GENERAL"

The type of the industry. Valid values:

  • GENERAL
  • ECOMMERCE
  • IT_CONTENT

indexes

Array

No

["default"]

The indexes to which the query analysis rule applies.

processors[]

Object

No

The features that are used in the query analysis rule.

active

Boolean

No

true

Specifies whether the query analysis rule is enabled.

For more information, see QueryProcessor.

Response parameters

Parameter Type Example Description
requestId String D77D0DAF-790D-F5F5-A9C0-133738165014

The ID of the request.

result Struct

The information about the query analysis rule.

active Boolean true

Indicates whether the query analysis rule is the default one.

created Integer 0
domain String GENERAL

The type of the industry. Valid values:

  • GENERAL
  • ECOMMERCE
  • IT_CONTENT
indexes List [ "default" ]

The indexes to which the query analysis rule applies.

name String synonym

The name of the query analysis rule.

processors List [ "default" ]
updated Integer 1
Response parameters

Parameter

Type

Description

requestId

String

The ID of the request.

result

Object

The information about the query analysis rule.

For more information, see QueryProcessor.

Examples

Sample requests

PUT /v4/openapi/app-groups/os_function_test_v1/apps/110157886/query-processors/query_filter


{
    "domain": "GENERAL",
    "processors": [
        {
            "name": "synonym",
            "useSystemDictionary": true
        },
        {
            "name": "stop_word",
            "useSystemDictionary": true
        }
    ]
}

Sample success responses

XML format

<requestId>0A6EB64B-B4C8-CF02-810F-E660812972FF</requestId>
<result>
    <name>query_filter</name>
    <active>true</active>
    <indexes>default</indexes>
    <processors>
        <name>synonym</name>
        <useSystemDictionary>true</useSystemDictionary>
    </processors>
    <processors>
        <name>stop_word</name>
        <useSystemDictionary>true</useSystemDictionary>
    </processors>
    <domain>GENERAL</domain>
    <created>1587398402</created>
    <updated>1587398402</updated>
</result>

JSON format

{
    "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
    "result": {
        "name": "query_filter",
        "active": true,
        "indexes": "default",
        "processors": [
            {
                "name": "synonym",
                "useSystemDictionary": true
            },
            {
                "name": "stop_word",
                "useSystemDictionary": true
            }
        ],
        "domain": "GENERAL",
        "created": 1587398402,
        "updated": 1587398402
    }
}

Error codes

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