Auto indexes for expando properties in google engine for python

The google python sdk application engine offers an object of type Expando, which you can use to add dynamic properties to an object that can be stored in the data store.

The application also requires that for any property on which objects need to be searched or sorted, an index must be created before the application is uploaded to google servers. This is really strange because it means that I must know in advance what properties my users will create on my objects. If I knew this beforehand, why not define them as static properties in my existing model?

Does anyone know how to automatically create indexes for the dynamic properties of Expando models after loading into the application engine? If not, can someone tell me why gae advertises Expando as a dynamic construct, when it cannot allow you to create new properties that can be searched or sorted, only properties that are searchable or sortable.

+3
source share
1 answer

All properties are automatically indexed for simple queries. In this case, simple queries are those that:

  • Use only equality filters, without sorting orders or inequality filters.
  • Have an inequality filter or sort order in one field, without other filters.

- , , , .

. expandos, , , .

+4

Source: https://habr.com/ru/post/1787993/


All Articles