SQL FULLTEXT and AGAINST

51 Views Asked by At

I'm trying to fulltext search on a MariaDB database but for some reason i'm facing a problem and dont know what else to do.

Imagine you have a database with some data on it.

Will Smith En The Graham Norton Show
Steve Smith Departs South Africa Tour In Disgrace
You Take My Breath Away - Rex Smith
Jorja Smith - The One (High Contrast Remix)

on a table. and you want to search only the word "Will Smith"

    SELECT field FROM table AS t1 
    WHERE MATCH (t1.field) AGAINST ('"WILL smith"' IN BOOLEAN MODE)

But for some reason it returns me all and not just the rows with "Will Smith" on it.. any clue? for other words seems it works ok! but seems there's a problem with the word Will NOT SURE.

Don't say.. use WHERE LIKE '%Will Smith%' this is not the question.

1

There are 1 best solutions below

0
Rick James On