DEV Community

Discussion on: Appwrite x DEV Hackathon Help Thread

Collapse
 
gewenyu99 profile image
Vincent Ge • Edited

Hi, you were reaaallllly close to getting it right. The issue you were having with is_public,username <- Does not qualify as a valid index key - Link to image is that you had a comma in the Index Key. We don't allow commas in the name of an index because that really messes with parsing SQL :P

For example, this is from my project, patina-bot

await database.listDocuments("memedex", [sdk.Query.equal("user_id", msg.author.id), sdk.Query.equal("meme_name", memeName)]);
Enter fullscreen mode Exit fullscreen mode

Here's how I would create a two column index:

image

Collapse
 
gewenyu99 profile image
Vincent Ge

And here's what the created index looks like

image

Thread Thread
 
tqbit profile image
tq-bit

thank you so much for your reply. Works like a charm now 🥳