RESTful API for the OpenSearch Retrieval Engine Edition

更新时间:
复制 MD 格式

OpenSearch Retrieval Engine Edition provides a REST API built on top of the native Havenask DSL, offering a simpler alternative for querying without learning the full DSL syntax.

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

Name

Type

Required

Description

endpoint

string

true

The API endpoint of the instance.

table_name

string

true

The name of the index table to query.

query

string | json

true

Query clause

filter

string

false

Filter clause

config

json

false

Configuration clause

cluster

array

false

Cluster query clause

aggs

array

false

Statistics Clause

distinct

json

false

Distribution clause

sort

array

false

Sort clause

layer

array

false

Layered query clause

analyzer

json

false

Analyzer clause

cache

json

false

Query cache clause

summary

json

false

Summary clause

rank

json

false

Rank clause

kvpairs

json

false

kvpairs clause