I have a deployed GAE app, and I’ve noticed that I have this simple query:
MBObject.query(MBObject.groupId == group.id).fetch()
groupId is an ndb.StringProperty(indexed=True)
Looking at my index.yaml file and even Datastore Indexes in my GAE dashboard (at appengine.google.com), the index for this property is not listed, whatsoever. This could usually mean that I didn’t test the whole app in development mode before uploading, so I’d have to manually insert the index.
However, the query works just fine. It returns all the objects that I desire successfully. What I’m wondering is how this is possible? Why is the query going through even through groupId is not listed in my index.yaml nor my dashboard? Shouldn’t it raise some error?
GAE indexes all entities automatically and your query does not need a specific index definition in
index.yamlbecause you are querying on one only property (it would not create any even if you would query on more than one property).if you would order this query lets say by a
dateproperty it would create an index definition inindex.yamlif you would run it in the SDK or you can write them manually.from the docs: