Permalink
Browse files

Merge pull request #320 from glogiotatidis/763624

Make locations searchable
  • Loading branch information...
2 parents ecad72e + 82d4c55 commit 82ee23df5ae850ca4b84c76e46a9cd49280ed2de @glogiotatidis glogiotatidis committed Oct 5, 2012
Showing with 3 additions and 6 deletions.
  1. +2 −5 apps/users/models.py
  2. +1 −1 vendor
View
@@ -204,13 +204,10 @@ def search(cls, query, vouched=None, photo=None):
fields = ('display_name__text', 'username__text', 'bio__text',
'website__text', 'email__text', 'groups__text',
'skills__text', 'languages__text', 'first_name__prefix',
- 'last_name__prefix', 'ircname')
+ 'last_name__prefix', 'ircname', 'country__text_phrase',
+ 'region__text_phrase', 'city__text_phrase')
if query:
q = dict((field, query) for field in fields)
- q.update(dict((field, '"%s"' % query)
- for field in ('country__query_string',
- 'region__query_string',
- 'city__query_string')))
s = S(cls).query(or_=q)
else:
s = S(cls)
2 vendor
Submodule vendor updated 2 files
+1 −1 .gitmodules
+1 −1 src/elasticutils

0 comments on commit 82ee23d

Please sign in to comment.