注意:在未来的几个月内,我们将会重新整理 App Engine 文档网站,使得查找内容更轻松,并更好地与其他 Google Cloud 产品保持一致。将会提供相同的内容,但导航现在将与其余的 Cloud 产品相一致。
Python 2 不再受社区支持。我们建议您
将 Python 2 应用迁移到 Python 3。
函数
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
注意:**我们不再建议采用这种解决方案。**使用此 API 的应用只能在 Python 2 运行时环境中运行,并且必须先升级到[建议的解决方案] (/appengine/docs/standard/python/migrate-to-python3/migrating-services#migration_paths_for_bundled_services),然后才能迁移到 Python 3 运行时。
google.appengine.api.search
包包含以下函数:
-
get_indexes(namespace='', offset=None, limit=None, start_index_name=None, include_start_index=True, index_name_prefix=None, fetch_schema=False, deadline=None)
返回可用索引列表。
参数
- namespace
要返回的索引的命名空间。如果未设置,则使用当前命名空间。
- offset
要返回的第一个索引的偏移。
- limit
要返回的索引数。
- start_index_name
要返回的第一个索引的名称。
- include_start_index
如果为 true
,则在结果中包含 start_index_name
指定的索引。
- index_name_prefix
用于选择要返回的索引的前缀。
- fetch_schema
指定是否为每个索引获取架构。
- deadline
远程过程调用 (RPC) 的期限(以秒为单位)。
结果值
表示索引列表的 GetResponse
对象。如果 fetch_schema==true,则每个索引都将包含其架构。
异常
- TypeError
传递的参数无效。
- InternalError
请求在内部服务器上失败。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-04-17。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"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":"其他"
}]