Explicit classname in search to get faster

This commit is contained in:
Yohan Boniface 2013-06-25 00:14:15 +02:00
parent 4e12de175d
commit f648105f83

View file

@ -106,7 +106,7 @@ class Search(TemplateView, PaginatorMixin):
q = self.request.GET.get('q')
maps = []
if q:
maps = shortquery(Q(fulltext__containswords=q))
maps = shortquery(Q(classname='Map') & Q(fulltext__containswords=q))
maps = self.paginate(maps)
kwargs.update({
'maps': maps,