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
| Parameter | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | The endpoint of the OpenSearch API. |
table_name | string | Yes | The name of the index table to query. |
query | string|JSON | Yes | The query clause. |
filter | string | No | The filter clause. |
config | JSON | No | The config clause. |
cluster | array | No | The cluster clause. |
aggs | array | No | The aggs clause. |
distinct | JSON | No | The distinct clause. |
sort | array | No | The sort clause. |
layer | array | No | The layer clause. |
analyzer | JSON | No | The analyzer clause. |
cache | JSON | No | The cache clause. |
summary | JSON | No | The summary clause. |
rank | JSON | No | The rank clause. |
kvpairs | JSON | No | The kvpairs clause. |
该文章对您有帮助吗?