I added a custom field to comments and now I want to change the order they are shown in to sort by this field then by date. Is there any way to change the comments publication query in my local code without editing the base packages?

So far I've tried overwriting the postComments view with this code but to no effect.

// my new field is commentRank

Comments.views.add("postComments", function (terms) {
  return {
    find: {postId: terms.postId},
    options: {limit: 0, sort: {commentRank: 1, score: -1, postedAt: -1}}
  };
});

Comments

No comments to display.