当前位置: 动力学知识库 > 问答 > 编程问答 >

amazon dynamodb - Query primary + local secondary indexes

问题描述:

If I have "userID" (primary), "forum topic" (secondary-a), "subtopic" inside "topic" (secondary-b). I need to read/write/search subtopic text.

Can I query Primary (hash+range) + Secondary-A + Secondary-B key in single query to get specific results? Or I query Primary OR Secondary-a OR Secondary-b, so only 1 index choice?

网友答案:

If i understand your question correctly!!! you need to add the Indexes equals to secondary attribute you are creating. Eg: if you have attribute "Secondary-A" and you should create index for it like "Secondary-A-Index". note: your only able to query through the index what you created.

分享给朋友:
您可能感兴趣的文章:
随机阅读: