Skip to content

Commit

Permalink
Search: Remove unused sorts_menu_mapping
Browse files Browse the repository at this point in the history
sorts_menu_mapping was replaced by g.search_sorts.
  • Loading branch information
Florence Yeun committed May 20, 2015
1 parent ce5c263 commit 44a168d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions r2/r2/lib/providers/search/cloudsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@
_CHUNK_SIZE = 4000000 # Approx. 4 MB, to stay under the 5MB limit
_VERSION_OFFSET = 13257906857

SORTS_MENU_MAPPING = {'relevance': 1,
'hot': 2,
'new': 3,
'top': 4,
'comments': 5,
}

class CloudSearchUploader(object):
use_safe_get = False
Expand Down Expand Up @@ -712,12 +706,6 @@ def _run_cached(cls, query, bq, sort="relevance", rank_expressions=None,
class LinkSearchQuery(CloudSearchQuery):
search_api = g.CLOUDSEARCH_SEARCH_API
sorts = g.search_sorts
sorts_menu_mapping = {'relevance': 1,
'hot': 2,
'new': 3,
'top': 4,
'comments': 5,
}
recents = {
'hour': timedelta(hours=1),
'day': timedelta(days=1),
Expand Down Expand Up @@ -791,11 +779,6 @@ class CloudSearchSubredditSearchQuery(CloudSearchQuery):
'relevance': '-relevance',
'activity': '-activity',
}
sorts_menu_mapping = {
'relevance': 1,
'activity': 2,
}

known_syntaxes = ("plain",)
default_syntax = "plain"

Expand Down

0 comments on commit 44a168d

Please sign in to comment.