More complex indexes
It would be awesome if at some point Convex could support PostgresJSON-like index's so we could index deeply within objects.
Im thinking something like the following:
3 Replies
this should work, but your syntax is slightly off. it's
.index("by_status_kind", ['status.kind'])
. here's an example in the wild https://github.com/get-convex/ai-town/blob/fe26a3ee5c40dd3a838bd4be7831a55eeb4aa210/convex/schema.ts#L278GitHub
ai-town/convex/schema.ts at fe26a3ee5c40dd3a838bd4be7831a55eeb4aa21...
A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize. - get-convex/ai-town
oh jeeze! I apologise! I didnt realise we could do this already. You guys are great 😄
no worries. not at all obvious, and it's kind of a power-user feature anyway 🙂