How can I create composite index without using GAE?

百般思念 提交于 2019-12-23 22:13:13

问题


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:


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.



来源:https://stackoverflow.com/questions/43603209/how-can-i-create-composite-index-without-using-gae

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!