Question

With OSQA installed using IIS and MySQL, tag search works, however questions search does not. All results show blank.

I read through this post and this one, but I don't see an actual solution. If I missed it can someone please clarify or provide a solution?

I also found this post which refers to this link to download a MySQL module to enable FTS, however that link results in a server error.

Thank you.

Was it helpful?

Solution

I added the contents of fts_install.sql (just do a search for that file) (below). Had to make some small modifications to the INSERT statements, but seems to work:

ALTER TABLE osqa634.forum_mysqlftsindex CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

delimiter |

CREATE TRIGGER osqa634.fts_on_insert AFTER INSERT ON osqa634.forum_node
  FOR EACH ROW
  BEGIN
    INSERT INTO osqa634.forum_mysqlftsindex 
    SET node_id=NEW.id, 
        title=UPPER(NEW.title), 
        body=UPPER(NEW.body), 
        tagnames=UPPER(NEW.tagnames); 
  END;
|

delimiter |

CREATE TRIGGER osqa634.fts_on_update AFTER UPDATE ON forum_node
  FOR EACH ROW
  BEGIN
    UPDATE osqa634.forum_mysqlftsindex 
    SET title = UPPER(NEW.title), 
    body = UPPER(NEW.body), 
    tagnames = UPPER(NEW.tagnames) 
    WHERE node_id = NEW.id;
  END;

|

INSERT INTO osqa634.forum_mysqlftsindex (node_id, title, body, tagnames) 
SELECT id, UPPER(title), UPPER(body), UPPER(tagnames) FROM osqa634.forum_node;

Seems to do the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top