public class QueryCollectionDataShrinkRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
collection
The name of the collection.
|
String |
content
The content that is used for full-text search.
|
String |
DBInstanceId
The instance ID.
|
String |
filter
The filter condition that is used to query data.
|
String |
hybridSearch
The two-way retrieval algorithm.
|
String |
hybridSearchArgsShrink
The parameters of the two-way retrieval algorithm.
|
String |
includeMetadataFields
The metadata fields to be returned.
|
Boolean |
includeValues
Specifies whether to return vector data.
|
String |
metrics
The similarity algorithm for search.
|
String |
namespace
The name of the namespace.
|
String |
namespacePassword
This parameter is required.
|
Integer |
offset
The starting point for paginated queries.
|
String |
orderBy
The fields by which to sort the results.
|
Long |
ownerId |
String |
regionId
The region ID of the instance.
|
String |
relationalTableFilterShrink |
Long |
topK
This parameter is required.
|
String |
vectorShrink
The vector data.
|
String |
workspaceId
example:
gp-ws-*****
|
| 构造器和说明 |
|---|
QueryCollectionDataShrinkRequest() |
@NameInMap(value="Collection") public String collection
The name of the collection.
You can call the ListCollections operation to query a list of collections.
This parameter is required.
example:document
@NameInMap(value="Content") public String content
The content that is used for full-text search. If you leave this parameter empty, only vector search is used. If you do not leave this parameter empty, two-way retrieval based on vector search and full-text search is used.
example:You must specify at least one of the Content and Vector parameters.
hello_world
@NameInMap(value="DBInstanceId") public String DBInstanceId
The instance ID.
example:You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-xxxxxxxxx
@NameInMap(value="Filter") public String filter
The filter condition that is used to query data. Specify the parameter in the WHERE clause format. The parameter is an expression that returns a Boolean value of TRUE or FALSE. The parameter can contain comparison operators, such as Equal To (=), Not Equal To (<> or !=), Greater Than (>), Less Than (<), Greater Than or Equal To (>=), and Less Than or Equal To (<=), logical operators, such as AND, OR, and NOT, and keywords, such as IN, BETWEEN, and LIKE.
response > 200
@NameInMap(value="HybridSearch") public String hybridSearch
The two-way retrieval algorithm. This parameter is empty by default, which specifies that scores of vector search and full-text search are directly compared and sorted without additional weighting or adjustments.
Valid values:
RRF
@NameInMap(value="HybridSearchArgs") public String hybridSearchArgsShrink
The parameters of the two-way retrieval algorithm. The following parameters are supported:
1/(k+rank_i) formula. The constant k is a positive integer that is greater than 1.{
"RRF": {
"k": 60
}
}
alpha * vector_score + (1-alpha) * text_score formula. The alpha parameter specifies the proportion of the vector search score and the full-text search score and ranges from 0 to 1. A value of 0 specifies full-text search and a value of 1 specifies vector search.{
"Weight": {
"alpha": 0.5
}
}
@NameInMap(value="IncludeMetadataFields") public String includeMetadataFields
The metadata fields to be returned. Separate multiple fields with commas (,). This parameter is empty by default.
example:title,content
@NameInMap(value="IncludeValues") public Boolean includeValues
Specifies whether to return vector data. Valid values:
true
@NameInMap(value="Metrics") public String metrics
The similarity algorithm for search. Valid values:
example:If you leave this parameter empty, the l2, ip, or cosine algorithm that is specified when you create an index is used.
cosine
@NameInMap(value="Namespace") public String namespace
The name of the namespace.
example:You can call the ListNamespaces operation to query a list of namespaces.
mynamespace
@NameInMap(value="NamespacePassword") public String namespacePassword
This parameter is required.
example:testpassword
@NameInMap(value="Offset") public Integer offset
The starting point for paginated queries. This parameter is empty by default. This parameter does not support two-way retrieval scenarios.
The value must be greater than or equal to 0. If you do not leave this parameter empty, the Total parameter is returned to indicate the total number of matched entries. You must specify this parameter and the TopK parameter in pairs. For example, to paginate 20 chunks at a time for a total of 45 chunks whose chunk_id values are 0 to 44, three requests are involved:
0
@NameInMap(value="OrderBy") public String orderBy
The fields by which to sort the results. This parameter is empty by default. This parameter does not support two-way retrieval scenarios.
You must specify the default fields in the metadata or the table, such as id. You can specify the following number of fields:
chunk_id
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="RegionId") public String regionId
The region ID of the instance.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="RelationalTableFilter") public String relationalTableFilterShrink
@NameInMap(value="TopK") public Long topK
This parameter is required.
example:10
@NameInMap(value="Vector") public String vectorShrink
The vector data. The length of the value must be the same as that of the Dimension parameter in the CreateCollection operation.
If you leave this parameter empty, only full-text search results are returned.
@NameInMap(value="WorkspaceId") public String workspaceId
gp-ws-*****
public static QueryCollectionDataShrinkRequest build(Map<String,?> map) throws Exception
Exceptionpublic QueryCollectionDataShrinkRequest setCollection(String collection)
public String getCollection()
public QueryCollectionDataShrinkRequest setContent(String content)
public String getContent()
public QueryCollectionDataShrinkRequest setDBInstanceId(String DBInstanceId)
public String getDBInstanceId()
public QueryCollectionDataShrinkRequest setFilter(String filter)
public String getFilter()
public QueryCollectionDataShrinkRequest setHybridSearch(String hybridSearch)
public String getHybridSearch()
public QueryCollectionDataShrinkRequest setHybridSearchArgsShrink(String hybridSearchArgsShrink)
public String getHybridSearchArgsShrink()
public QueryCollectionDataShrinkRequest setIncludeMetadataFields(String includeMetadataFields)
public String getIncludeMetadataFields()
public QueryCollectionDataShrinkRequest setIncludeValues(Boolean includeValues)
public Boolean getIncludeValues()
public QueryCollectionDataShrinkRequest setMetrics(String metrics)
public String getMetrics()
public QueryCollectionDataShrinkRequest setNamespace(String namespace)
public String getNamespace()
public QueryCollectionDataShrinkRequest setNamespacePassword(String namespacePassword)
public String getNamespacePassword()
public QueryCollectionDataShrinkRequest setOffset(Integer offset)
public Integer getOffset()
public QueryCollectionDataShrinkRequest setOrderBy(String orderBy)
public String getOrderBy()
public QueryCollectionDataShrinkRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public QueryCollectionDataShrinkRequest setRegionId(String regionId)
public String getRegionId()
public QueryCollectionDataShrinkRequest setRelationalTableFilterShrink(String relationalTableFilterShrink)
public String getRelationalTableFilterShrink()
public QueryCollectionDataShrinkRequest setTopK(Long topK)
public Long getTopK()
public QueryCollectionDataShrinkRequest setVectorShrink(String vectorShrink)
public String getVectorShrink()
public QueryCollectionDataShrinkRequest setWorkspaceId(String workspaceId)
public String getWorkspaceId()
Copyright © 2024. All rights reserved.