An apostrophe / single quote (') should be part of a word in a FULLTEXT index.
Admittedly I can't find this on the MariaDB website, but I'm assuming it should still behave like MySQL (version 5.5).
But when using "IN BOOLEAN MODE", and prefixing the word with a "+" (so it's mandatory in all rows returned), the record is not returned.
For example:
CREATE TABLE customer ( name TINYTEXT NOT NULL, FULLTEXT (name) ) ENGINE = InnoDB; INSERT INTO customer VALUES ('O''Brien'); INSERT INTO customer VALUES ('O Brien'); INSERT INTO customer VALUES ('X''Brien'); INSERT INTO customer VALUES ('Extra Amy'); INSERT INTO customer VALUES ('Extra Brian'); INSERT INTO customer VALUES ('Extra Cat'); INSERT INTO customer VALUES ('Extra Debbie'); I get these results:
SELECT * FROM customer WHERE MATCH (name) AGAINST ("O'Brien" IN BOOLEAN MODE); "O'Brien" "O Brien" "X'Brien" 3 rows in set (0.000 sec) SELECT * FROM customer WHERE MATCH (name) AGAINST ("+O'Brien" IN BOOLEAN MODE); Empty set (0.000 sec) SELECT * FROM customer WHERE MATCH (name) AGAINST ("+Brien" IN BOOLEAN MODE); "O'Brien" "O Brien" "X'Brien" 3 rows in set (0.000 sec) SELECT * FROM customer WHERE MATCH (name) AGAINST (+"O'Brien" IN BOOLEAN MODE); "O'Brien" "O Brien" "X'Brien" 3 rows in set (0.000 sec) Am I missing something, like needing to quote the apostrophe?
Or is this an intentional difference between InnoDB and MyISAM?
Thanks to @rick-james, I've updated this question to include 3 "extra" records to avoid the 50% threshold limit, and I've included an example where the + is before the quoted word.