日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

restful api文檔搜索Demo

通過SDK 調用向量檢索版實例進行數據檢索

通用代碼示例

from alibabacloud_ha3engine import models, client
from Tea.exceptions import TeaException, RetryError
import json

Config = models.Config(
    endpoint="ha-cn-***********.public.ha.aliyuncs.com",
    instance_id="ha-cn-***********",
    protocol="http",
    access_user_name="username",
    access_pass_word="passsword"

)

# 初始化 Ha3Engine Client
ha3EngineClient = client.Client(Config)

def search():
    try:
        # 構造rest查詢條件,具體查詢語法請參考:http://bestwisewords.com/document_detail/2247524.html?spm=a2c4g.2247608.0.0.4eeb2393PCewr2
        data = {"query": "index_id: 1", "config": {"format": "json"}}
        json_str = json.dumps(data)

    	# 構造SearchRequestModel查詢對象
        searchRequestModel = models.SearchRequestModel(body=json_str)

        # 替換{indexName}為待查詢實例的索引表名
        responseModel = ha3EngineClient.search_rest(request=searchRequestModel, index_name="{indexName}")
        print(responseModel.body)

    except TeaException as e:
        print(f"send request with TeaException : {e}")
    except RetryError as e:
        print(f"send request with Connection Exception  : {e}")

search()