erquhart
erquhart14mo ago

Index name length limit undocumented, incorrect error message

I believe I ran into a 64 character limit on index names, I'm not sure if it's documented, but I couldn't find it in any of the limit docs. Passing the limit triggers the invalid name error, which doesn't mention length:
400 Bad Request: InvalidIndexName: Hit an error while evaluating your schema:
In table `my_table`: Invalid index name: by_aField_anotherField_moarField_andThisFieldTooAlso_andAnotherOne
. Identifiers must start with a letter and can only contain letters, digits, and underscores.
400 Bad Request: InvalidIndexName: Hit an error while evaluating your schema:
In table `my_table`: Invalid index name: by_aField_anotherField_moarField_andThisFieldTooAlso_andAnotherOne
. Identifiers must start with a letter and can only contain letters, digits, and underscores.
2 Replies
Michal Srb
Michal Srb14mo ago
It's the same limit (apparently) as document field name length, documented here: https://docs.convex.dev/production/state/limits#documents Will add a note about index names
Limits | Convex Developer Hub
We’d love for you to have unlimited joy building on Convex but engineering
erquhart
erquhartOP14mo ago
Ah that makes sense 👍 Error message could use a mention too.

Did you find this page helpful?