Inside my model I had a property that was set to indexed=False. To use it in a projection I had to change this to indexed=True. But surprisingly now doing a query does not give a single result, always empty. Any hint to reindex the table or why the result set is empty?

https://developers.google.com/appengine/docs/python/ndb/properties#options

有帮助吗?

解决方案

For data that was saved before you changed indexed from False to True, any indexes will not include that property. You need to save each of your entities again to re-index them with the property now included in the index.

Depending on the size of your dataset, you can do this in a request handler (100s of entities), a taskqueue (1000s of entities), or using a MapReduce job (10000+ entities).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top