Skip to content
Browse files

improve exact-name matches for search - thanks, @robhudson (bug 773007)

  • Loading branch information...
1 parent e21b881 commit ee468c9b805c42e0af435949a55f35b0daaf621f @cvan cvan committed Jul 11, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 apps/search/views.py
View
1 apps/search/views.py
@@ -463,6 +463,7 @@ def name_only_query(q):
d = {}
rules = {'text': {'query': q, 'boost': 3, 'analyzer': 'standard'},
+ 'text': {'query': q, 'boost': 4, 'type': 'phrase'},
'fuzzy': {'value': q, 'boost': 2, 'prefix_length': 4},
'startswith': {'value': q, 'boost': 1.5}}
for k, v in rules.iteritems():

2 comments on commit ee468c9

@robhudson
Mozilla member

what, no tests?

@cvan
Mozilla member
cvan commented on ee468c9 Jul 12, 2012

it has your name on it, so I think this code speaks for itself.

Please sign in to comment.
Something went wrong with that request. Please try again.