List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 13 2002 11:53pm
Subject:Re: fulltext search using MATCH ... AGAINST with AND - any
alternatives?
View as plain text  
At 19:20 -0400 9/13/02, Aaron Hazelton wrote:
>Hi List,
>
>I have a RH Linux 7.1 running MySQL 3.23.36 and am wanting
>to do a search like this (go easy, im a newbie):
>
>SELECT sku, title, price, description, color, size
>	FROM products
>	WHERE MATCH (sku,title,description,comment)
>	AGAINST ('[value query]');
>
>it works fine (I guess :-) but it basically does an OR search for the
>words of the query value.  I have looked around the mail list and
>it seems that there is no way in this version to cause an AND
>search.

Not with a single MATCH() clause.  Prior to 4.x, you can use:

WHERE MATCH(...) AGAINST(word1)
AND MATCH(...) AGAINST(word2)
AND ...

but that's pretty ugly.

>
>Are there any alternatives, even if speed is compromised
>slightly to get the same effect?
>_______________________________________________
>
>    Sincerely,
>Aaron Hazelton
>  >>Hazenet<<

Thread
fulltext search using MATCH ... AGAINST with AND - any alternatives?Aaron Hazelton14 Sep
  • Re: fulltext search using MATCH ... AGAINST with AND - anyalternatives?Paul DuBois14 Sep