All Products
Search
Document Center

OpenSearch:RESTful API syntax of OpenSearch Retrieval Engine Edition

Last Updated:Feb 28, 2024

To help you get familiar with the domain-specific language (DSL) syntax of OpenSearch Retrieval Engine Edition, Alibaba Cloud standardizes and upgrades the DSL syntax and provides easy-to-use RESTful API operations.

Query syntax

curl -X POST "http://{endpoint}/{table_name}/search" -H 'Content-Type: application/json' -d'
{
    "query": "",
    "filter": "",
    "config": {},
    "cluster": {},
    "aggs": [],
    "distinct": {},
    "sort": [],
    "layer": [],
    "analyzer": {},
    "cache": {},
    "summary": {},
    "rank": {},
    "kvpairs": {}
}
'

Parameters

Parameter

Type

Required

Description

endpoint

string

true

The endpoint of the OpenSearch API.

table_name

string

true

The name of the index table that you want to query.

query

string|json

true

The query clause.

filter

string

false

The filter clause.

config

json

false

The config clause.

cluster

array

false

The cluster clause.

aggs

array

false

The aggs clause.

distinct

json

false

The distinct clause.

sort

array

false

The sort clause.

layer

array

false

The layer clause.

analyzer

json

false

The analyzer clause.

cache

json

false

The cache clause.

summary

json

false

The summary clause.

rank

json

false

The rank clause.

kvpairs

json

false

The kvpairs clause.