Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Prospective Search support ndb.model?

A colleague is getting

DocumentTypeError: Document type is not supported.

when calling Subscribe using an ndb document type, on the dev appserver.
Are ndb and Prospective Search compatible?

like image 927
Emlyn O'Regan Avatar asked Mar 17 '26 02:03

Emlyn O'Regan


1 Answers

Yes, ndb and Prospective search are compatible but you need to use prospective_search for ndb:

from google.appengine.ext.ndb import prospective_search

Regarding the error, from the source:

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

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

like image 190
Rob Curtis Avatar answered Mar 18 '26 16:03

Rob Curtis