w3c
w3c
CCConvex Community
Created by w3c on 2/3/2025 in #support-community
Querying array fields in Convex
I have a question about querying array fields in Convex. In my schema, articles have a 'tagIds' array field:
articles: defineTable({
tagIds: v.array(v.id("tags")),
// other fields...
}).index("by_tags", ["tagIds"])
articles: defineTable({
tagIds: v.array(v.id("tags")),
// other fields...
}).index("by_tags", ["tagIds"])
How can I query for all articles that contain a specific tagId, regardless of what other tags they might have? Is array filtering possible in the query, or do I need to query all articles and filter in memory?
4 replies