public class CreateCollectionRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
collection
The name of the collection that you want to create.
|
String |
DBInstanceId
The instance ID.
|
Long |
dimension
The number of vector dimensions.
|
Integer |
externalStorage
Specifies whether to use the memory mapping technology to create HNSW indexes.
|
String |
fullTextRetrievalFields
example:
title,content
|
Integer |
hnswM
The maximum number of neighbors for the Hierarchical Navigable Small World (HNSW) algorithm.
|
String |
managerAccount
This parameter is required.
|
String |
managerAccountPassword
This parameter is required.
|
String |
metadata
The metadata of the vector data, which is a JSON string in the MAP format.
|
String |
metrics
example:
cosine
|
String |
namespace
The name of the namespace.
|
Long |
ownerId |
String |
parser
example:
zh_cn
|
Integer |
pqEnable
Specifies whether to enable the product quantization (PQ) feature for index acceleration.
|
String |
regionId
The region ID of the instance.
|
String |
workspaceId
The ID of the workspace that consists of multiple AnalyticDB for PostgreSQL instances.
|
| 构造器和说明 |
|---|
CreateCollectionRequest() |
@NameInMap(value="Collection") public String collection
The name of the collection that you want to create.
The name must comply with the naming conventions of PostgreSQL objects.
This parameter is required.
example:document
@NameInMap(value="DBInstanceId") public String DBInstanceId
The instance ID.
example:You can call the DescribeDBInstances operation to query the IDs of all AnalyticDB for PostgreSQL instances in a specific region.
gp-xxxxxxxxx
@NameInMap(value="Dimension") public Long dimension
The number of vector dimensions.
example:If you specify this parameter, an index is created. When you call the UpsertCollectionData operation, make sure that the length of the Rows.Vector parameter is the same as the value of this parameter. If you do not specify this parameter, you can call the CreateVectorIndex operation to create an index.
1024
@NameInMap(value="ExternalStorage") public Integer externalStorage
Specifies whether to use the memory mapping technology to create HNSW indexes. Valid values: 0 and 1. Default value: 0. We recommend that you set the value to 1 in scenarios that require upload speed but not data deletion.
0: uses segmented paging storage to create indexes. This method uses the shared buffer of PostgreSQL for caching and supports the delete and update operations.
1: uses the memory mapping technology to create indexes. This method does not support the delete or update operation.
0
@NameInMap(value="FullTextRetrievalFields") public String fullTextRetrievalFields
title,content
@NameInMap(value="HnswM") public Integer hnswM
The maximum number of neighbors for the Hierarchical Navigable Small World (HNSW) algorithm. Valid values: 1 to 1000. In most cases, this parameter is automatically configured based on the value of the Dimension parameter. You do not need to configure this parameter.
We recommend that you configure this parameter based on the value of the Dimension parameter.
*If you set Dimension to a value less than or equal to 384, set the value of HnswM to 16.
*If you set Dimension to a value greater than 384 and less than or equal to 768, set the value of HnswM to 32.
*If you set Dimension to a value greater than 768 and less than or equal to 1024, set the value of HnswM to 64.
*If you set Dimension to a value greater than 1024, set the value of HnswM to 128.
example:64
@NameInMap(value="ManagerAccount") public String managerAccount
This parameter is required.
example:testaccount
@NameInMap(value="ManagerAccountPassword") public String managerAccountPassword
This parameter is required.
example:testpassword
@NameInMap(value="Metadata") public String metadata
The metadata of the vector data, which is a JSON string in the MAP format. The key specifies the field name, and the value specifies the data type.
For information about the supported data types, see Data types.
The money data type is not supported.
**
Warning Reserved fields such as id, vector, to_tsvector, and source cannot be used.
This parameter is required.
example:{"title":"text","content":"text","response":"int"}
@NameInMap(value="Metrics") public String metrics
cosine
@NameInMap(value="Namespace") public String namespace
The name of the namespace.
example:You can call the CreateNamespace operation to create a namespace and call the ListNamespaces operation to query a list of namespaces.
mynamespace
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="Parser") public String parser
zh_cn
@NameInMap(value="PqEnable") public Integer pqEnable
Specifies whether to enable the product quantization (PQ) feature for index acceleration. We recommend that you enable this feature for more than 500,000 rows of data. Valid values:
0
@NameInMap(value="RegionId") public String regionId
The region ID of the instance.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="WorkspaceId") public String workspaceId
The ID of the workspace that consists of multiple AnalyticDB for PostgreSQL instances. You must specify one of the WorkspaceId and DBInstanceId parameters. If you specify both parameters, the WorkspaceId parameter takes effect.
example:gp-ws-*****
public static CreateCollectionRequest build(Map<String,?> map) throws Exception
Exceptionpublic CreateCollectionRequest setCollection(String collection)
public String getCollection()
public CreateCollectionRequest setDBInstanceId(String DBInstanceId)
public String getDBInstanceId()
public CreateCollectionRequest setDimension(Long dimension)
public Long getDimension()
public CreateCollectionRequest setExternalStorage(Integer externalStorage)
public Integer getExternalStorage()
public CreateCollectionRequest setFullTextRetrievalFields(String fullTextRetrievalFields)
public String getFullTextRetrievalFields()
public CreateCollectionRequest setHnswM(Integer hnswM)
public Integer getHnswM()
public CreateCollectionRequest setManagerAccount(String managerAccount)
public String getManagerAccount()
public CreateCollectionRequest setManagerAccountPassword(String managerAccountPassword)
public String getManagerAccountPassword()
public CreateCollectionRequest setMetadata(String metadata)
public String getMetadata()
public CreateCollectionRequest setMetrics(String metrics)
public String getMetrics()
public CreateCollectionRequest setNamespace(String namespace)
public String getNamespace()
public CreateCollectionRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public CreateCollectionRequest setParser(String parser)
public String getParser()
public CreateCollectionRequest setPqEnable(Integer pqEnable)
public Integer getPqEnable()
public CreateCollectionRequest setRegionId(String regionId)
public String getRegionId()
public CreateCollectionRequest setWorkspaceId(String workspaceId)
public String getWorkspaceId()
Copyright © 2024. All rights reserved.