0

If I execute this GQL query:

GQLQuery("SELECT user FROM MyUser WHERE foo = :1", fooz)

It will cause my index.yaml to make a composite index with both the user and foo properties.

- kind: MyUser
  properties:
  - name: user
  - name: foo

And if i delete that index, when it's uploaded to App Engine and my app runs, an error appears no matching index found.

I just don't understand why GAE must create a composite index for that query??

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
Hai Phaikawl
  • 1,091
  • 8
  • 11

1 Answers1

2

This behaviour is fully documented here:

Projection queries require all properties specified in the projection to be included in a datastore index.

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895