diff options
author | Anuja <anujag@anujag-Latitude-D630.(none)> | 2012-03-21 17:34:34 +0530 |
---|---|---|
committer | Anuja <anujag@anujag-Latitude-D630.(none)> | 2012-03-21 17:34:34 +0530 |
commit | 874fceac6498f2ba733c433b964f9ce5975d6a69 (patch) | |
tree | aee7c168a44287d5b8ec22582d654b970eb6108e /gstudio/search.py | |
parent | 9d76c138b63828b549b33fe1b9a8ad4ab3dd8d86 (diff) | |
download | gnowsys-874fceac6498f2ba733c433b964f9ce5975d6a69.tar.gz |
Changes made on model files and search files
Diffstat (limited to 'gstudio/search.py')
-rw-r--r-- | gstudio/search.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gstudio/search.py b/gstudio/search.py index adbb037..7312ad6 100644 --- a/gstudio/search.py +++ b/gstudio/search.py @@ -64,7 +64,7 @@ from pyparsing import operatorPrecedence from django.db.models import Q -from gstudio.models import Nodetype +from gstudio.models import Node from gstudio.settings import STOP_WORDS @@ -96,9 +96,9 @@ def createQ(token): return Q() if not meta: - return Q(content__icontains=search) | \ - Q(excerpt__icontains=search) | \ - Q(title__icontains=search) + return Q(title__icontains=search) + ''' Q(content__icontains=search) | \ + Q(excerpt__icontains=search) | \ ''' if meta == 'metatype': if wildcards == 'BOTH': @@ -178,4 +178,4 @@ def advanced_search(pattern): """Parse the grammar of a pattern and build a queryset with it""" query_parsed = QUERY.parseString(pattern) - return Nodetype.published.filter(query_parsed[0]).distinct() + return Node.published.filter(query_parsed[0]).distinct() |