From f648105f834915cc0566de4050833200737aa0b7 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 25 Jun 2013 00:14:15 +0200 Subject: [PATCH] Explicit classname in search to get faster --- umap/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/views.py b/umap/views.py index d88e48e6..6d4e0fb3 100644 --- a/umap/views.py +++ b/umap/views.py @@ -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,