Commit 0a97ae75fe0a853da8296e9b4a2df1816c834733

Authored by Sergio Oliveira
1 parent 78520e73

Fixing score by newest

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
src/search/forms.py
@@ -95,13 +95,12 @@ class ColabSearchForm(SearchForm): @@ -95,13 +95,12 @@ class ColabSearchForm(SearchForm):
95 q = unicodedata.normalize( 95 q = unicodedata.normalize(
96 'NFKD', unicode(self.cleaned_data.get('q')) 96 'NFKD', unicode(self.cleaned_data.get('q'))
97 ).encode('ascii', 'ignore') 97 ).encode('ascii', 'ignore')
98 - sqs = sqs.auto_query(q)  
99 sqs = sqs.filter(content=AltParser( 98 sqs = sqs.filter(content=AltParser(
100 'dismax', 99 'dismax',
101 q, 100 q,
102 pf='title^2.1 author^1.9 description^1.7', 101 pf='title^2.1 author^1.9 description^1.7',
103 mm='2<70%', 102 mm='2<70%',
104 - b='recip(ms((NOW/HOUR),(modified/HOUR)),3.16e-11,1,1)', 103 + bf='recip(ms(NOW/DAY,modified),3.16e-11,1,1)^10',
105 )) 104 ))
106 105
107 if self.cleaned_data['type']: 106 if self.cleaned_data['type']: