All Products
Search
Document Center

OpenSearch:GetIndex

Last Updated:Oct 16, 2024

Queries the information about an index version.

Operation description

Method

GET

URI

/openapi/ha3/instances/{instanceId}/indexes/{indexName}

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
searchengine:GetIndexget
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

GET /openapi/ha3/instances/{instanceId}/indexes/{indexName} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-8ed2j834u03
indexNamestringYes

The index name.

index_jiayi_text

Response parameters

ParameterTypeDescriptionExample
object
requestIdstring

The request ID.

4FB0325E-8C37-5525-96AC-0333523170A3
resultobject

The index information.

namestring

The index name.

general
versionsarray<object>

The information about the versions.

versionsobject
descstring

The description of the version.

close alarm, by 3.9.2 hotfix workflow
filesarray<object>

The information about the files.

filesobject
fullPathNamestring

The full path of the file.

" "
isDirboolean

Indicates whether the file is a directory.

True
isTemplateboolean

Indicates whether the file is a template.

True
namestring

The file name.

qrs.json
namestring

The version name.

ha-cn-7pp2ngv4s02_qrs
statusstring

The status of the index version. Valid values:

  • NEW: The index version is created.
  • PUBLISH: The index version is normal.
  • IN_USE: The index version is in use.
  • NOT_USE: The index version is not used.
  • STOP_USE: The index version is being stopped.
  • RESTORE_USE: The index version is being restored.
  • FAIL: The index version failed to be created.
2
updateTimelong

The time when the index version was updated.

" "
versionIdinteger

The version ID.

1
dataSourcestring

The name of the data source.

ha-cn-tl32nd2nq01_00
domainstring

The deployment name of the index.

sz_vpc_domain_1
indexStatusstring

The status of the index version. Valid values:

  • NEW: The index version is created.
  • PUBLISH: The index version is normal.
  • IN_USE: The index version is in use.
  • NOT_USE: The index version is not used.
  • STOP_USE: The index version is being stopped.
  • RESTORE_USE: The index version is being restored.
  • FAIL: The index version failed to be created.
IN_USE
contentstring

The file content.

{"summarys":{"parameter":{"file_compressor":"zstd"},"summary_fields":["id"]},"file_compress":[{"name":"file_compressor","type":"zstd"},{"name":"no_compressor","type":""}],"indexs":[{"index_fields":"name","index_name":"ids","index_type":"STRING"},{"has_primary_key_attribute":true,"index_fields":"id","is_primary_key_sorted":false,"index_name":"id","index_type":"PRIMARYKEY64"}],"attributes":[{"file_compress":"no_compressor","field_name":"id"}],"fields":[{"user_defined_param":{},"compress_type":"uniq","field_type":"STRING","field_name":"id"},{"compress_type":"uniq","field_type":"STRING","field_name":"name"}],"table_name":"api"}
partitioninteger

The number of shards.

2
fullVersionlong

The data version.

1688523414
fullUpdateTimestring

The time when full data in the index was last updated.

2024-06-20 08:52:54
incUpdateTimestring

The time when incremental data in the index was last updated.

2024-06-20 08:52:54
indexSizelong

The index size.

4689
descriptionstring

The description of the index version.

test index
dataSourceInfoobject

The information about the data source.

processPartitionCountinteger

The number of resources used for data update.

2
namestring

The name of the data source.

ha-cn-pl32rf0****_test_api
typestring

The type of the data source. Valid values: odps, swift, saro, oss, and unKnow.

odps
domainstring

The data center in which the data source is deployed.

vpc_hz_domain_1
configobject

The configuration of MaxCompute data sources.

endpointstring

The endpoint of the MaxCompute data source.

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

The AccessKey ID of the MaxCompute data source.

L***p
accessSecretstring

The AccessKey secret of the MaxCompute data source.

5**9a6
projectstring

The name of the MaxCompute project that is used as the data source.

tisplus_dev
partitionstring

The partition in the MaxCompute table. Example: ds=20180102.

ds=20220713
tablestring

The name of the MaxCompute table that is used as the data source.

dump_odps_demo
namespacestring

The namespace. This parameter is applicable to the SARO data source used in the intranet of Alibaba Group.

TEST_dump_demo_sj_na61hunbu2_share_holo
pathstring

The file path in the Apsara File Storage for HDFS file system.

http://test_opensearch/sift_oss_test.data
ossPathstring

The Object Storage Service (OSS) path.

/test_opensearch/sift_oss_test.data
bucketstring

The name of the OSS bucket.

ha3test-oss
saroConfigobject

The configurations of the SARO data source.

namespacestring

The namespace of the SARO data source.

TEST_dump_demo_sj_na61hunbu2_share_holo
tableNamestring

The name of the SARO table.

llm
autoBuildIndexboolean

Indicates whether the automatic full indexing feature is enabled.

true
processParallelNuminteger

The maximum number of full indexes that can be concurrently processed.

2
clusterobject

The cluster information.

object

The cluster information.

buildParallelNuminteger

The maximum number of full indexes that can be concurrently built.

2
mergeParallelNuminteger

The maximum number of full indexes that can be concurrently merged.

2
configobject

The configuration information.

object

The configuration information.

object

The information about the child configuration item.

namestring

The configuration name.

ha-cn-pl32rf0****_offline_adv_v1
updateTimestring

The time when the configuration was updated.

1716258634000
descstring

The description of the advanced configuration.

Description
configWhenBuildobject

The configuration that takes effect next time.

object

The configuration that takes effect next time.

object

The child configuration item that takes effect next time.

namestring

The configuration name.

ha-cn-pl32rf0****_offline_adv_v1
updateTimestring

The time when the configuration was updated.

1716258634000
descstring

The description of the advanced configuration.

Description
extendobject

Extended information

array

Extended information

extendstring

Extended information

Extended information

Sample responses

Sample success response

{
    "requestId": "e1eef569-1ff7-4bf8-acf7-1cecca9894ce",
    "result": {
        "name": "index-name",
        "dataSource": "ha-cn-xxx-index-name",
        "domain": "test", // The name of the data source.
        "partition": 2,
        "indexStatus": "IN_USE",
        "content": "{\n\t\"summarys\":{\n\t\t\"parameter\":{\n\t\t\t\"file_compressor\":\"zstd\"\n\t\t},\n\t\t\"summary_fields\":[\n\t\t\t\"id\"\n\t\t]\n\t},\n\t\"file_compress\":[\n\t\t{\n\t\t\t\"name\":\"file_compressor\",\n\t\t\t\"type\":\"zstd\"\n\t\t},\n\t\t{\n\t\t\t\"name\":\"no_compressor\",\n\t\t\t\"type\":\"\"\n\t\t}\n\t],\n\t\"indexs\":[\n\t\t{\n\t\t\t\"index_fields\":\"name\",\n\t\t\t\"index_name\":\"ids\",\n\t\t\t\"index_type\":\"STRING\"\n\t\t},\n\t\t{\n\t\t\t\"has_primary_key_attribute\":true,\n\t\t\t\"index_fields\":\"id\",\n\t\t\t\"is_primary_key_sorted\":false,\n\t\t\t\"index_name\":\"id\",\n\t\t\t\"index_type\":\"PRIMARYKEY64\"\n\t\t}\n\t],\n\t\"attributes\":[\n\t\t{\n\t\t\t\"file_compress\":\"no_compressor\",\n\t\t\t\"field_name\":\"id\"\n\t\t}\n\t],\n\t\"fields\":[\n\t\t{\n\t\t\t\"user_defined_param\":{},\n\t\t\t\"compress_type\":\"uniq\",\n\t\t\t\"field_type\":\"STRING\",\n\t\t\t\"field_name\":\"id\"\n\t\t},\n\t\t{\n\t\t\t\"compress_type\":\"uniq\",\n\t\t\t\"field_type\":\"STRING\",\n\t\t\t\"field_name\":\"name\"\n\t\t}\n\t],\n\t\"table_name\":\"api\"\n}",
        "extend": {
            "vector": [
                "vector"
            ],
            "embeding": [
                "id"
            ],
            "description": [
                "{\"feild2\":\"Note 2\"}",
                "{\"feild3\":\"Note 3\"}"
            ]
        },
        "cluster": {
            "build_parallel_num": "2",
            "merge_parallel_num": "2"
        },
        "dataSourceInfo": {
            "type": "odps",
            "dataSource": "ha-cn-xxx-index-name",
            "processPartitionCount": 2,
            "domain": "test",
            "autoBuildIndex": true,
            "config": {
                "project": "tisplus_dev",
                "table": "tisplus_one_key_build_station_template_table_test",
                "partition": "ds=12345",
                "accesskeyId": "root",
                "accesskeySecret": "root123",
                "endpoint": "http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api"
            },
            "saroConfig": {
                "namespace": "TEST_dump_demo_sj_na61hunbu2_share_holo",
                "tableName": "dump_odps_demo"
            },
            "processParallelNum": 2,
           "swiftConfig":{
              "topic":"ha-cn-xxx-index-name"
            }
        },
        "config": {
            "OFFLINE_DICT": {
                "name": "ha-cn-finxmo71065_offline_dict_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_TABLE": {
                "name": "ha-cn-finxmo71065_table_ha-cn-finxmo71065_test_saro_v2",
                "updateTime": 1709261682000,
                "desc": "Description"
            },
            "OFFLINE_COMMON": {
                "name": "ha-cn-finxmo71065_offline_adv_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_PLUGIN": {
                "name": "ha-cn-finxmo71065_offline_plugin_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_INDEX": {
                "name": "ha-cn-finxmo71065@ha-cn-finxmo71065_test_saro@test_saro@index_config_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            }
        },
        "configWhenBuild": {
            "OFFLINE_DICT": {
                "name": "ha-cn-finxmo71065_offline_dict_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_TABLE": {
                "name": "ha-cn-finxmo71065_table_ha-cn-finxmo71065_test_saro_v2",
                "updateTime": 1709261682000,
                "desc": "Description"
            },
            "OFFLINE_COMMON": {
                "name": "ha-cn-finxmo71065_offline_adv_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_PLUGIN": {
                "name": "ha-cn-finxmo71065_offline_plugin_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            },
            "OFFLINE_INDEX": {
                "name": "ha-cn-finxmo71065@ha-cn-finxmo71065_test_saro@test_saro@index_config_v2",
                "updateTime": 1709259817000,
                "desc": "Description"
            }
        }
    }

Examples

Sample success responses

JSONformat

{
  "requestId": "4FB0325E-8C37-5525-96AC-0333523170A3",
  "result": {
    "name": "general",
    "versions": [
      {
        "desc": "close alarm, by 3.9.2 hotfix workflow",
        "files": [
          {
            "fullPathName": "\" \"",
            "isDir": true,
            "isTemplate": true,
            "name": "qrs.json"
          }
        ],
        "name": "ha-cn-7pp2ngv4s02_qrs",
        "status": "2",
        "updateTime": 0,
        "versionId": 1
      }
    ],
    "dataSource": "ha-cn-tl32nd2nq01_00",
    "domain": "sz_vpc_domain_1",
    "indexStatus": "IN_USE",
    "content": "{\"summarys\":{\"parameter\":{\"file_compressor\":\"zstd\"},\"summary_fields\":[\"id\"]},\"file_compress\":[{\"name\":\"file_compressor\",\"type\":\"zstd\"},{\"name\":\"no_compressor\",\"type\":\"\"}],\"indexs\":[{\"index_fields\":\"name\",\"index_name\":\"ids\",\"index_type\":\"STRING\"},{\"has_primary_key_attribute\":true,\"index_fields\":\"id\",\"is_primary_key_sorted\":false,\"index_name\":\"id\",\"index_type\":\"PRIMARYKEY64\"}],\"attributes\":[{\"file_compress\":\"no_compressor\",\"field_name\":\"id\"}],\"fields\":[{\"user_defined_param\":{},\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"id\"},{\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"name\"}],\"table_name\":\"api\"}",
    "partition": 2,
    "fullVersion": 1688523414,
    "fullUpdateTime": "2024-06-20 08:52:54",
    "incUpdateTime": "2024-06-20 08:52:54",
    "indexSize": 4689,
    "description": "test index",
    "dataSourceInfo": {
      "processPartitionCount": 2,
      "name": "ha-cn-pl32rf0****_test_api\n",
      "type": "odps",
      "domain": "vpc_hz_domain_1",
      "config": {
        "endpoint": "http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api",
        "accessKey": "L***p",
        "accessSecret": "5**9a6",
        "project": "tisplus_dev",
        "partition": "ds=20220713",
        "table": "dump_odps_demo",
        "namespace": "TEST_dump_demo_sj_na61hunbu2_share_holo",
        "path": "http://test_opensearch/sift_oss_test.data",
        "ossPath": "/test_opensearch/sift_oss_test.data",
        "bucket": "ha3test-oss",
        "catalog": "",
        "database": "",
        "tag": ""
      },
      "saroConfig": {
        "namespace": "TEST_dump_demo_sj_na61hunbu2_share_holo",
        "tableName": "llm"
      },
      "autoBuildIndex": true,
      "processParallelNum": 2
    },
    "cluster": {
      "key": {
        "buildParallelNum": 2,
        "mergeParallelNum": 2
      }
    },
    "config": {
      "key": {
        "key": {
          "name": "\nha-cn-pl32rf0****_offline_adv_v1",
          "updateTime": "1716258634000",
          "desc": "Description\n"
        }
      }
    },
    "configWhenBuild": {
      "key": {
        "key": {
          "name": "\nha-cn-pl32rf0****_offline_adv_v1",
          "updateTime": "1716258634000",
          "desc": "Description\n"
        }
      }
    },
    "extend": {
      "key": [
        "Extended information\n"
      ]
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-31The response structure of the API has changedView Change Details
2024-05-16The response structure of the API has changedView Change Details
2023-07-20The request parameters of the API has changed. The response structure of the API has changedView Change Details
2022-01-12Add OperationView Change Details