Question

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

Était-ce utile?

La solution

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).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top