/ / Google App Engine indexed property with None value - google-app-engine, app-engine-ndb

Propriedade indexada do Google App Engine com valor Nenhum - google-app-engine, app-engine-ndb

To my surprise, an indexed property with a None value in GAE still counts towards write costs, and is still indexed. Apparently, this can be desired behavior in some circumstances, according to this post:

https://groups.google.com/forum/#!msg/google-appengine/pRHA85s3U-o/frdJeab8RVwJ

Also according to that post is something called "partial indexes", but that"s for Java. I"m using NDB with Python. I"d like for indexed properties with None values not to be indexed, and not count towards write costs. Is this possible?

Respostas:

1 para resposta № 1

That"s not possible unless you use an Expando. You could also hack it using a repeated property (0 or 1 items) but that changes the way your app sees it.