python - 前瞻性搜索是否支持 ndb.model?

标签 python google-app-engine python-2.7

一位同事得到了

DocumentTypeError: Document type is not supported.

在开发应用服务器上使用 ndb 文档类型调用订阅时。
ndbProspective Search 兼容吗?

最佳答案

是的,ndb 和 Prospective search 是兼容的,但是你需要为 ndb 使用 prospective_search:

从 google.appengine.ext.ndb 导入 prospective_search

关于错误,来源:

get_document() Raises DocumentTypeError: if document class is not recognized.

http://appengine-ndb-experiment.googlecode.com/hg/ndb/prospective_search.py

关于python - 前瞻性搜索是否支持 ndb.model?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12247610/

相关文章:

python - 在函数之间传递类

python - SQLAlchemy - Session.query 循环中的 Session.commit 重置对象 __dict__

performance - Google App Engine 上的 django-nonrel 性能

go - 如何在 Google App Engine 中提供凭据和其他 secret ?

尽管已安装 Python 模块但未被检测到

python - python 生成器函数中引发的 StopIteration 异常处理

python - 自定义 sklearn 变压器类中矩阵 (X) 的维数(行)减少

python - 带有谷歌应用引擎的静态图像文件夹

python - 比较两个字典并打印差异

python - 使用 try...except 捕获特定异常