]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/mysqlfulltext/startup.py
Merge pull request #46 from udacity/subfolder_fixes
[osqa.git] / forum_modules / mysqlfulltext / startup.py
index 1b12517bb688cdd8c6404c6639ccf0d311d0b617..8c2af5fadb488a6e10e70cecce6142fa42e4d532 100644 (file)
@@ -51,8 +51,8 @@ def question_search(self, keywords):
                 match(forum_mysqlftsindex.tagnames) against (%s) * 2 +
                 match(forum_mysqlftsindex.title) against (%s) * 4 +
                 match(forum_mysqlftsindex.body) against (%s) * 1
-                                """,
+                """,
             },
         select_params=[keywords, keywords, keywords]
-    ).filter(Q(title__search=keywords) | Q(tagnames__search=keywords) | Q(body__search=keywords))
+    ).filter(Q(ftsindex__title__search=keywords) | Q(ftsindex__tagnames__search=keywords) | Q(ftsindex__body__search=keywords))
     return '-ranking', qs