MySQL Forums
Forum List  »  Full-Text Search

How do you set a field match as optional, but LITERAL
Posted by: fat joe
Date: July 03, 2008 01:41AM

Below my fulltext search query

****************
SELECT
description,title,category,
MATCH(c.category) AGAINST('scanner' IN BOOLEAN MODE)*3+
MATCH(i.title) AGAINST('+scanner*' IN BOOLEAN MODE)*3+
AS score
FROM inventory i,category c
WHERE MATCH(title,description) AGAINST('+scanner*' IN BOOLEAN MODE)
and i.cat_id = c.cat_id
ORDER by score desc
LIMIT 0, 500
****************

I want to change: MATCH(c.category) AGAINST('scanner' IN BOOLEAN MODE)*3+

So that finding scanner in c.category is OPTIONAL,
but to only match LITERALLY... so where c.category = scanner

Currently it is matching where scanner is contained within c.category!



Edited 3 time(s). Last edit at 07/03/2008 01:48AM by fat joe.

Options: ReplyQuote


Subject
Views
Written By
Posted
How do you set a field match as optional, but LITERAL
3867
July 03, 2008 01:41AM


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.