how do i skip indexed query field
it seems like i am forced to follow the order of the defined index in schema. I dont want to use filter because some of the query are hitting
too many bytes read
error. please help
schema.ts
function.ts
6 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
you can't skip fields in an index (see https://stack.convex.dev/databases-are-spreadsheets for why). what you can do is create multiple indexes with the fields in different orders.
Databases are Spreadsheets
I want to share my mental model of databases:
- Databases are just big spreadsheets
- An index is just a view of the spreadsheet sorted by one or mor...
What if i have 4 to 5 more optional field that i want to filter ? Do i need to do index for all combinations??
yes, if you want them to be efficient. i would pick the most important combinations and use filters for the rest
thanks for the suggestion. now i've pushed the new few indexed fields to production and convex deploy command is taking too long, i assume its because we have too many rows.
is there a way for me to see the progress (on vercel)? im gonna add few more indexed fields later
its been 15 minutes like this
