full text search - MySQL FTS implementation -


I work on a ticket system in PHP / MySQL We provide mysql in boolean mode FTS has implemented. The user enters the search string and we present him a list of issues. The following is a sample database schema:

Issues table - ( id , title , description ) There is an FTS index (title, description) in

issue_size table - ( id , Issue_id , comment ) There is an FTS index (comment) in each issue.

There may be several comments in each issue, then there may be several rows in the Events_ comments table in the Problem Table in the row

Ask the subject to enter a search string - alpha beta

The PHP script breaks down String in different words, before each word a ' + 'and perform the following queries.

  Select the ID as the issue issue, where the match (title, description) ('+ alpha + beta' in the Boolean mode) chooses the union, issue issue issue issues, internal issues Issues issue on Id = Issue_comments.issue_id where (comment against '+ alpha + beta' in Boolean mode)  

This searches all issues - in alpha and beta (title, description) Being either
or both of the alpha and beta in one of the comments of this issue

But there is a limit to this setup - I want to see if any problem exists in the title of alpha issue and if the beta is present in one of its comments, Is not possible with.
How can I get it?

I have not yet tried to do it in real life, but to specify multiple columns It should also work in Boolean mode:

  against match (title, comment) ...  

There is no explicit mention of it, but < Strong> rows , which are not searched, not columns.


Comments