Sort the posts in a topic by the post id