MySQL Forums
Forum List  »  Full-Text Search

Re: Full Text search
Posted by: Rick James
Date: August 25, 2011 05:32PM

You need these:
FULLTEXT(title, body) -- in news
FULLTEXT(title, body) -- in body
FULLTEXT(question, answer) -- in faq

SELECT ... FROM news n JOIN ...
WHERE MATCH(n.title, n.body) AGAINST(+nika +chitanava IN BOOLEAN MODE)
UNION DISTINCT
SELECT ... FROM body b JOIN ...
WHERE MATCH(b.title, b.body) AGAINST(+nika +chitanava IN BOOLEAN MODE)
UNION DISTINCT
SELECT ... FROM faq f JOIN ...
WHERE MATCH(f.question, f.answer) AGAINST(+nika +chitanava IN BOOLEAN MODE);

The SELECT ... should fetch the same stuff.
The JOIN... should be JOINing the three tables.

Options: ReplyQuote


Subject
Views
Written By
Posted
3809
August 24, 2011 04:19AM
Re: Full Text search
2033
August 25, 2011 05:32PM
1768
September 04, 2011 12:10PM
2080
September 07, 2011 09:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.