Is 'second' a keyword in mysql full-text searches?
Posted
by Larry
on Stack Overflow
See other posts from Stack Overflow
or by Larry
Published on 2010-05-01T15:09:00Z
Indexed on
2010/05/01
15:17 UTC
Read the original article
Hit count: 362
mysql
|full-text-search
I have a simple MySQL table that is setup for full text search.
| id | title |
----------------------
| 1 | test event |
| 2 | Second test |
| 3 | Larry's event |
| 4 | this second |
When I use the query:
SELECT *
FROM EVENTS
WHERE MATCH (title) AGAINST ('test event' IN BOOLEAN MODE);
I get back 3 rows; the ones containing 'test event', 'Second test', and 'Larry's Event'.
Now If I run the following query:
SELECT *
FROM EVENTS
WHERE MATCH (title) AGAINST ('second' IN BOOLEAN MODE);
Nothing is returned... strange?
Lastly, if I run the query:
SELECT *
FROM EVENTS
WHERE MATCH (title) AGAINST ('second test' IN BOOLEAN MODE);
I get back 2 rows; the ones containing 'test event' and 'Second test'.
I appears that the word 'second' cannot be searched or needs to be escaped somehow. Am I missing something?
© Stack Overflow or respective owner