from forum.models.node import Node
from forum.modules import decorate
-VERSION = 3
+VERSION = 4
f_name = None
def question_search(self, keywords):
keywords = keywords.upper()
- return '-ranking', self.filter(
+ qs = self.filter(
models.Q(ftsindex__body__isnull=False)
).extra(
select={
""",
},
select_params=[keywords, keywords, keywords]
- )
+ ).filter(Q(title__search=keywords) | Q(tagnames__search=keywords) | Q(body__search=keywords))
+ return '-ranking', qs