Skip to content

Commit

Permalink
bug 575698, Filter not by locale in collections.
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Sep 2, 2010
1 parent dbab432 commit d47b7e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/search/client.py
Expand Up @@ -600,13 +600,13 @@ class CollectionsClient(Client):

def query(self, term, limit=10, offset=0, **kwargs):
sc = self.sphinx
sc.SetSelect("collection_id")
weight_field = ('@weight + IF(locale_ord=%d, 29, 0) AS myweight '
% get_locale_ord())

sc.SetSelect('collection_id, %s' % weight_field)
sc.SetLimits(min(offset, SPHINX_HARD_LIMIT - 1), limit)
term = sanitize_query(term)

self.add_filter('locale_ord', get_locale_ord())

sort_field = 'weekly_subscribers DESC'

sort_choices = {
Expand Down

0 comments on commit d47b7e8

Please sign in to comment.