From 127e890f5e43f7fb8bf91efa59002c57bd427a14 Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Fri, 31 Aug 2012 10:55:33 -0700 Subject: [PATCH] Search: Sort by number of comments --- r2/r2/lib/cloudsearch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/lib/cloudsearch.py b/r2/r2/lib/cloudsearch.py index af236d303..2e9fcfa5d 100644 --- a/r2/r2/lib/cloudsearch.py +++ b/r2/r2/lib/cloudsearch.py @@ -735,11 +735,13 @@ class LinkSearchQuery(CloudSearchQuery): 'hot': '-hot2', 'top': '-top', 'new': '-timestamp', + 'comments': '-num_comments', } sorts_menu_mapping = {'relevance': 1, 'hot': 2, 'new': 3, 'top': 4, + 'comments': 5, } lucene_parser = l2cs.make_parser(int_fields=['timestamp'],