I'm trying to build a search feature in to my website. Searching is the primary purpose of the site and I am having a few issues with the MySQL search feature.
I would like to be able to search with a single search string against multiple text fields.
I'm using MySQL's match...against statements to perform a full-text search. I'm running this in Boolean mode.
My SQL looks something like this:
SELECT * FROM ...
WHERE MATCH(table.field1, table.field2, table.field3)
AGAINST ('laptop' IN BOOLEAN MODE)
Currently this returns results that have the word laptop
but not if they have the word laptops
.
I need it to return results that contain the word laptop
or laptops
.