MySQL Forums
Forum List  »  Full-Text Search

Advanced FULLTEXT Search
Posted by: Greg Young
Date: April 26, 2010 09:30AM

Hi all,

I have the following query to run a boolean query on various columns in my database placing weight on title before any other column...

----------------------

SELECT *, ( (1.3 * (MATCH(title) AGAINST ('wood' IN BOOLEAN MODE))) + (0.6 * (MATCH(isbnnospace,title,description1,description2,description3,description4,authorName) AGAINST ('wood' IN BOOLEAN MODE)))) AS relevance FROM tblBooks WHERE ( MATCH(isbnnospace,title,description1,description2,description3,description4,authorName) AGAINST ('wood' IN BOOLEAN MODE) ) and OP = 'FALSE' HAVING relevance > 0 ORDER BY relevance DESC

----------------------

This is currently working well and it's correctly returning rows with "wood" in the title before other columns, but I need to make a slight change to this.

There are various books in the database with the titles like "Woodturning" or "Woodwork Management". How can I modify the above query to include these books in the returned results?

Thanks very much in advance!

Options: ReplyQuote


Subject
Views
Written By
Posted
Advanced FULLTEXT Search
4673
April 26, 2010 09:30AM
2194
April 28, 2010 07:07AM


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.