CREATE TRIGGER fts_on_insert AFTER INSERT ON forum_node
FOR EACH ROW
BEGIN
- INSERT INTO forum_mysqlftsindex (node_id, body) VALUES (NEW.id, CONCAT_WS('\n', NEW.title, NEW.body, NEW.tagnames));
+ INSERT INTO forum_mysqlftsindex (node_id, body) VALUES (NEW.id, UPPER(CONCAT_WS('\n', NEW.title, NEW.body, NEW.tagnames)));
END;
|
CREATE TRIGGER fts_on_update AFTER UPDATE ON forum_node
FOR EACH ROW
BEGIN
- UPDATE forum_mysqlftsindex SET body = CONCAT_WS('\n', NEW.title, NEW.body, NEW.tagnames) WHERE node_id = NEW.id;
+ UPDATE forum_mysqlftsindex SET body = UPPER(CONCAT_WS('\n', NEW.title, NEW.body, NEW.tagnames)) WHERE node_id = NEW.id;
END;
|
-INSERT INTO forum_mysqlftsindex (node_id, body) SELECT id, CONCAT_WS('\n', title, body, tagnames) FROM forum_node;
\ No newline at end of file
+INSERT INTO forum_mysqlftsindex (node_id, body) SELECT id, UPPER(CONCAT_WS('\n', title, body, tagnames)) FROM forum_node;
\ No newline at end of file
@decorate(QuestionManager.search, needs_origin=False)
def question_search(self, keywords):
- return False, self.filter(models.Q(ftsindex__body__search=keywords))
\ No newline at end of file
+ return False, self.filter(models.Q(ftsindex__body__search=keywords.upper()))
\ No newline at end of file