View Full Version : Fulltext returning too many results

07-14-2006, 05:49 PM
How do I get a fulltext search to return only records that contain all terms instead of records that contain any of the terms?

In other words, if I enter the search "blues clues" MySQL will only find records that contain the words "blues" AND "clues" without having to introduce special boolean search syntax.

07-14-2006, 07:11 PM
I think "in boolean mode" is your best bet. Just parse all the words based on the space character, trim them, then append a + sign to the front.

SELECT * FROM yourtable WHERE MATCH (booktitle) AGAINST ('+blues +clues' IN BOOLEAN MODE)

07-19-2006, 05:19 PM
Thanks....that did the trick!