Repository navigation
Datastore: When runQuery fails with index required, the exact index needed should be part of the error message. #1090
Copy link
Copy link
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
Description
Activity
- changed the title
[-]Datastore.runQuery: When fails with index required, the exact index needed should be part of the error message.[/-][+]Datastore: When runQuery fails with index required, the exact index needed should be part of the error message.[/+]on Jan 26, 2016 For instance, this is the query I am currently trying to run:
{ "namespace":null, "kinds":["Task"], "filters":[ { "name":"__key__", "op":"HAS_ANCESTOR", "val":{ "name":"9CDFB82D-FC98-2B7F-22C5-A391A0623474", "kind":"Project", "path":["Project","9CDFB82D-FC98-2B7F-22C5-A391A0623474"] } }, {"name":"parentId =","op":"=","val":"9"} ], "orders":[{"name":"order","sign":"+"}], "groupByVal":[], "selectVal":[], "autoPaginateVal":true, "startVal":null, "endVal":null, "limitVal":-1, "offsetVal":-1 }I get the Error that no matching index is found.
My application has the following index specified:Task
Includes ancestors parentId ▲ + order ▲This leaves me unsure of what the problem is, or what index I need to add.
@pcostell - is it possible/reliable to generate such an error message given the query object and 412 response?
- addedapi: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
on Jan 27, 2016 Yup this has been a rough experience. We are working on adding this to the server error message, so as long as you pass along the error message this should start working soon.
Cool, that will be a great addition! We pass the raw API message, so the user will get it when it's available.
- added a commit that references this issue
on Aug 29, 2025 - added a commit that references this issue
on Sep 2, 2025 - added a commit that references this issue
on Sep 4, 2025 - added a commit that references this issue
on Jan 28, 2026 - added a commit that references this issue
on Feb 17, 2026 - added a commit that references this issue
on Feb 25, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 18, 2026 - added 2 commits that reference this issue
on Mar 23, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.
This is the current error message when a required index is not found:
Many lives would be immeasurably improved if the error looked more like this: