表示对搜索索引引擎的提示。
| JSON 表示法 |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "useIndex": { object ( |
| 字段 | |
|---|---|
| 要使用的索引类型。以下是互斥字段的列表。在响应中,最多只能设置一个字段: | |
useIndex |
可选。已弃用:请改用 |
useKnn |
可选。已弃用:请改用 |
knnHint |
可选。如果设置,搜索将使用系统的默认 K-最近邻 (KNN) 索引引擎。 |
indexHint |
可选。指定搜索应使用特定索引。 |
| 互斥字段的结束位置。 | |
IndexHint
用于指定要用于搜索的索引的消息。
| JSON 表示法 |
|---|
{
"name": string,
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"denseScannParams": {
object ( |
| 字段 | |
|---|---|
name |
必需。用于搜索的索引的资源名称。索引必须位于同一项目、位置和集合中。格式: |
| 索引的参数。以下是互斥字段的列表。在响应中,最多只能设置一个字段: | |
denseScannParams |
可选。密集 ScaNN 参数。 |
| 互斥字段的结束位置。 | |
DenseScannParams
密集 ScaNN 的参数。
| JSON 表示法 |
|---|
{ "searchLeavesPct": integer, "initialCandidateCount": integer, "targetRecall": number } |
| 字段 | |
|---|---|
searchLeavesPct |
可选。用于控制召回率和延迟时间的密集 ANN 参数替换。要搜索的叶所占的百分比,范围为 [0, 100]。不支持 |
initialCandidateCount |
可选。初始候选对象数量。必须是正整数(大于 0)。不支持 |
targetRecall |
可选。搜索的目标召回率。必须是 [0, 1] 范围内的双精度浮点数。虽然搜索旨在实现此召回率,但无法保证一定能实现。 |
KnnHint
此类型没有字段。
如果应明确在系统的默认 K 最近邻 (KNN) 索引引擎上执行搜索,则将使用 KnnHint。