Musikdoktor
Musikdoktor

Reputation: 144

SQL FULLTEXT and AGAINST

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.

Upvotes: 0

Views: 49

Answers (1)

Rick James
Rick James

Reputation: 142560

https://mariadb.com/kb/en/library/full-text-index-stopwords/#innodb-stopwords Seems to cover it for InnoDB in MariaDB.

Upvotes: 0

Related Questions