发送反馈
REST Resource: projects.databases.collectionGroups.fields
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:字段
表示数据库中的单个字段。
字段按其“集合组”进行分组,集合组表示数据库中具有相同 ID 的所有集合。
JSON 表示法
{
"name" : string ,
"indexConfig" : {
object (IndexConfig
)
}
}
字段
name
string
格式为 projects/{projectId}/databases/{databaseId}/collectionGroups/{collectionId}/fields/{fieldPath}
的字段名称
字段路径可以是简单的字段名称(如 address
),也可以是指向 mapValue 中字段的路径(如 address.city
)或特殊字段路径。唯一有效的特殊字段是 *
,它表示任何字段。
可以使用 (backtick). The only character that needs
to be escaped within a quoted field path is the backtick character itself,
escaped using a backslash. Special characters in field paths that
must be quoted include:
*,
.,
``` (backtick),
[,
]` 以及任何 ASCII 符号字符引用字段路径。
示例:(注意:此处的注释采用 Markdown 语法编写,因此还有一层额外的反引号来表示代码块)\
address.city`represents a field named
address.city, not the map key
cityin the field
address.
`*`represents a field named
*`,而不是任何字段。
特殊的 Field
包含所有字段的默认索引编制设置。此字段的资源名称为:projects/{projectId}/databases/{databaseId}/collectionGroups/__default__/fields/*
。在此 Field
中定义的索引将应用于自身没有 Field
索引配置的所有字段。
indexConfig
object (IndexConfig
)
此字段的索引配置。如果未设置,字段索引编制将还原为 ancestorField
定义的配置。如需明确移除此字段的所有索引,请使用空索引列表指定索引配置。
IndexConfig
JSON 表示法
{
"indexes" : [
{
object (Index
)
}
] ,
"usesAncestorConfig" : boolean ,
"ancestorField" : string ,
"reverting" : boolean
}
字段
indexes[]
object (Index
)
此字段支持的索引。
usesAncestorConfig
boolean
仅供输出。如果为 true,则 Field
的索引配置根据 ancestorField
指定的配置设置。如果为 false,系统会明确定义 Field
的索引配置。
ancestorField
string
仅供输出。指定 Field
的资源名称,系统将根据此资源名称设置此字段的索引配置(当 usesAncestorConfig
为 true 时),或根据此资源设置此字段(如果此字段没有索引配置,则基于此资源名称(当 usesAncestorConfig
为 false 时)。
reverting
boolean
仅在输出结果为 true 时,正在还原 Field
的索引配置。完成后,索引配置将转换为与 ancestorField
指定的字段相同的状态,此时 usesAncestorConfig
将变为 true
,reverting
将变为 false
。
方法
获取字段的元数据和配置。
列出此数据库的字段配置和元数据。
更新字段配置。
发送反馈
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可 获得了许可,并且代码示例已根据 Apache 2.0 许可 获得了许可。有关详情,请参阅 Google 开发者网站政策 。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-04-12。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
需要向我们提供更多信息?