文档

GetTable - 获取索引表信息

更新时间:

获取索引表信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
searchengine:GetTable
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

请求语法

GET /openapi/ha3/instances/{instanceId}/tables/{tableName}

请求参数

名称类型必填描述示例值
instanceIdstring

实例 ID

ha-cn-pl32rf0****
tableNamestring

索引表名称

test_summary

请求示例



GET /openapi/ha3/instances/{instanceId}/tables/{tableName}

返回参数

名称类型描述示例值
object
requestIdstring

requestId

2AE63638-5420-56DC-BF59-37D8174039A0
resultobject

返回结果

namestring

索引名

test_oss
statusstring

索引表状态 (NEW, PUBLISH, IN_USE: 召回引擎版创建成功后为正常状态, NOT_USE, STOP_USE, RESTORE_USE, FAIL: 向量检索版新版本首次创建索引失败状态)

IN_USE
dataProcessorCountinteger

数据更新资源数

1
partitionCountinteger

数据分片数

1
dataSourceobject

数据源配置

typestring

数据源类型: 仅支持 odps、swift、oss 三种类型 (odps, swift, saro, oss, unKnow)

odps
dataTimeSecinteger

追增量时间戳

1715160176
autoBuildIndexboolean

是否自动索引重建

true
configobject

数据源配置

endpointstring

odps 相关

http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api
accessKeystring

AK

ak
accessSecretstring

AS

as
projectstring

odps 数据源项目名称

dp_pdm_marketing_prod
partitionstring

分区信息

ds=20220808
tablestring

saro、odps 数据源表名

test_add
namespacestring

saro 相关

namespace
pathstring

hdfs 相关

vendor/sebastian/comparator/src/exceptions
ossPathstring

oss 文件路径

/opensearch_index_data/sift_oss_test.data
bucketstring

oss 命名空间

heytea-ops-oss
rawSchemastring

如果用户传了 rawSchema,则直接使用 rawSchema 作为 ha3 schema 结构,不用手动拼装

{}
primaryKeystring

主键字段

id
fieldSchemaobject

字段 map 集合, key: 字段名 value: 字段类型

string

id

INT64
vectorIndexarray<object>

索引结构

object
indexNamestring

索引结构名称

test_odps
vectorFieldstring

向量字段

source_image_vector
sparseIndexFieldstring

稀疏向量下标字段

sparse_indices
sparseValueFieldstring

稀疏向量值字段

sparse_values
dimensionstring

向量维度

128
vectorIndexTypestring

向量索引算法

Qc
distanceTypestring

距离类型

SquaredEuclidean
namespacestring

命名空间字段

namespace
advanceParamsobject

索引结构配置

buildIndexParamsstring

索引构建参数

{ "proxima.qc.builder.quantizer_class": "Int8QuantizerConverter", "proxima.qc.builder.quantize_by_centroid": true, "proxima.qc.builder.optimizer_class": "BruteForceBuilder", "proxima.qc.builder.thread_count": 10, "proxima.qc.builder.optimizer_params": { "proxima.linear.builder.column_major_order": true }, "proxima.qc.builder.store_original_features": false, "proxima.qc.builder.train_sample_count": 3000000, "proxima.qc.builder.train_sample_ratio": 0.5 }
searchIndexParamsstring

索引检索参数

{"proxima.qc.searcher.scan_ratio":0.01}
minScanDocCntstring

召回候选集的个数最小值

20000
linearBuildThresholdstring

线性构建的阈值

5000
dataProcessConfigarray<object>

字段处理配置

object

字段处理配置

operatorstring

字段处理方式 (copy: 将源字段拷贝至目标字段, vectorize: 使用模型对源字段进行向量化,向量存储在目标字段中)

vectorize
dstFieldstring

目标字段

source_image_vector
srcFieldstring

源字段

source_image
paramsobject

配置模型信息

vectorModelstring

向量化模型

clip
vectorModalstring

数据类型

image
srcFieldConfigobject

向量化信息来源

ossEndpointstring

OSS 区域地址。

oss-cn-hangzhou-internal.aliyuncs.com
ossBucketstring

OSS Bucket

test
uidstring

云账号 id

uid

示例

正常返回示例

JSON格式

{
  "requestId": "2AE63638-5420-56DC-BF59-37D8174039A0",
  "result": {
    "name": "test_oss",
    "status": "IN_USE",
    "dataProcessorCount": 1,
    "partitionCount": 1,
    "dataSource": {
      "type": "odps",
      "dataTimeSec": 1715160176,
      "autoBuildIndex": true,
      "config": {
        "endpoint": "http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api",
        "accessKey": "ak",
        "accessSecret": "as",
        "project": "dp_pdm_marketing_prod",
        "partition": "ds=20220808",
        "table": "test_add",
        "namespace": "namespace",
        "path": "vendor/sebastian/comparator/src/exceptions",
        "ossPath": "/opensearch_index_data/sift_oss_test.data",
        "bucket": "heytea-ops-oss"
      }
    },
    "rawSchema": "{}",
    "primaryKey": "id",
    "fieldSchema": {
      "key": "INT64"
    },
    "vectorIndex": [
      {
        "indexName": "test_odps",
        "vectorField": "source_image_vector",
        "sparseIndexField": "sparse_indices",
        "sparseValueField": "sparse_values",
        "dimension": "128",
        "vectorIndexType": "Qc",
        "distanceType": "SquaredEuclidean",
        "namespace": "namespace",
        "advanceParams": {
          "buildIndexParams": "{\n  \"proxima.qc.builder.quantizer_class\": \"Int8QuantizerConverter\",\n  \"proxima.qc.builder.quantize_by_centroid\": true,\n  \"proxima.qc.builder.optimizer_class\": \"BruteForceBuilder\",\n  \"proxima.qc.builder.thread_count\": 10,\n  \"proxima.qc.builder.optimizer_params\": {\n    \"proxima.linear.builder.column_major_order\": true\n  },\n  \"proxima.qc.builder.store_original_features\": false,\n  \"proxima.qc.builder.train_sample_count\": 3000000,\n  \"proxima.qc.builder.train_sample_ratio\": 0.5\n}",
          "searchIndexParams": "{\"proxima.qc.searcher.scan_ratio\":0.01}",
          "minScanDocCnt": "20000",
          "linearBuildThreshold": "5000"
        }
      }
    ],
    "dataProcessConfig": [
      {
        "operator": "vectorize",
        "dstField": "source_image_vector",
        "srcField": "source_image",
        "params": {
          "vectorModel": "clip",
          "vectorModal": "image",
          "srcFieldConfig": {
            "ossEndpoint": "oss-cn-hangzhou-internal.aliyuncs.com\n",
            "ossBucket": "test",
            "uid": "uid"
          }
        }
      }
    ]
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-05-09OpenAPI 返回结构发生变更查看变更详情