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)?

Answers


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


Need Your Help

ionic: double curly braces "{{" not evaluated

html angularjs web ionic

I have an HTML file, in which i'm trying to display a variable from a controller, like so: