We are hosting a NodeJS application on compute engine, which connect to google DataStore using gcloud-node. Simple queries are running fine, but complex queries with multipple selects are giving "412: precondition failed" error. More details at": Multiple select in google datastore query throwing ApiError: Precondition Failed error in node
I understand this error is due to the fact I have not configured datastore-indexes.xml. Being a newbie in GCP world. Could you please help me where can I define my datastore-indexes.xml file inside my project.
You can also use the
gcloud preview app
tool with anindex.yaml
file to specify an indexing policy.For example, if you need an index on user and timestamp on LoginTimes: