Sort by dynamic value in Amazon Dynamodb?
I understand that dynamodb uses the local secondary index as static(ex. post_date,last_post_date..)
However, Can you use dynamodb to sort by a dynamic value such as (ex. number_replies in a Thread, or number_likes in a post)?
The question is bit old but i thought it might help someone,
What we can do is that we can create LSI or GSI and in that we can make number_replies as range, thus when querying GSI or LSI we will fetch all the replies of particular thread in ascending or descending order.
Hope that helps