I'm currently studying about MySQL command and got stuck at using the "MATCH...AGAINST" command on FULLTEXT index. It returns an "empty set" when it's against a "stopword"(which is "and" in my case).
Here's what I did. The database I'm working on contains a list of books and their author. I'm trying to select the entries that contain "and" in their title. Here's a list in my 'classics' table.
+--------------------+------------------------------+
| author | title |
+--------------------+------------------------------+
| Mark Twain | The Adventures of Tom Sawyer |
| Jane Austen | Pride and Prejudice |
| Charles Darwin | The Origin of Species |
| Charles Dickens | The Old Curiosity Shop |
| William Shakespear | Romeo and Juliet |
+--------------------+------------------------------+
This is the code I've written
SELECT author, title FROM classics
WHERE MATCH(author, title) AGAINST('and');
Empty set (0.00 sec)
The result in my expectation was "Pride and Prejudice" and "Romeo and Juliet" instead of "Empty set (0.00 sec)". I now realized that "and" is a stopword.
My question is What does the "stopword" mean and how do I know which word is a stopword? And what should I do if I really want to select the query which contains "and" in its title?