RESTful API syntax of OpenSearch Retrieval Engine Edition

更新时间:
复制 MD 格式

OpenSearch Retrieval Engine Edition provides RESTful API operations based on a standardized domain-specific language (DSL) syntax, making it straightforward to build and tune search queries.

Query syntax

Submit a search request using an HTTP POST to the /search endpoint:

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

ParameterTypeRequiredDescription
endpointstringYesThe endpoint of the OpenSearch API.
table_namestringYesThe name of the index table to query.
querystring|JSONYesThe query clause.
filterstringNoThe filter clause.
configJSONNoThe config clause.
clusterarrayNoThe cluster clause.
aggsarrayNoThe aggs clause.
distinctJSONNoThe distinct clause.
sortarrayNoThe sort clause.
layerarrayNoThe layer clause.
analyzerJSONNoThe analyzer clause.
cacheJSONNoThe cache clause.
summaryJSONNoThe summary clause.
rankJSONNoThe rank clause.
kvpairsJSONNoThe kvpairs clause.