How can I create composite index without using GAE

2019-07-17 14:49发布

I'm working on Google Cloud Datastore with Go SDK, and hitting a GQL query error - "Your Datastore does not have the composite index (developer-supplied) required for this query." I'm aware that I need to create the composite index. But according to Google Datastore document, it assumes that the application is up and running as an GAE, while in my case we run it on GKE and Go SDK to work with Datastore.

So my question is, do I need to have an GAE instance just for creating an composite index?

1条回答
干净又极端
2楼-- · 2019-07-17 15:35

You don't need a GAE instance to create an index.

See the section in the doc you linked on "Deploying or deleting indexes". You'll need to create an index.yaml file (see this page for examples) and then deploy it using the gcloud datastore create-indexes command.

查看更多
登录 后发表回答