DynamoDB - Global Secondary Index on set items

后端 未结 3 2101
遇见更好的自我
遇见更好的自我 2021-01-03 22:08

I have a dynamo table with the following attributes :

  • id (Number - primary key )
  • title (String)
  • created_at (Number - long)
  • tags (St
3条回答
  •  余生分开走
    2021-01-03 23:01

    You will need to create a separate table for this query. If you are interested in fetching all items based on a tag then I suggest keeping a table with a primary key:
    hash: tag
    range: id

    This way you can use a very simple Query to fetch all items by tag.

提交回复
热议问题