Is the "second" keyword in mysql full text search?

I have a simple MySQL table that is for full text search.

| id | title         |
----------------------
| 1  | test event    |
| 2  | Second test   |
| 3  | Larry event |
| 4  | this second   |

      

When I use the query:

SELECT * 
FROM EVENTS
WHERE MATCH (title) AGAINST ('test event' IN BOOLEAN MODE);

      

I go back 3 lines; the ones that contain "test event", "second test" and "Larry event".

Now if I run the following query:

SELECT * 
FROM EVENTS
WHERE MATCH (title) AGAINST ('second' IN BOOLEAN MODE);

      

Nothing comes back ... weird?

Finally, if I run the query:

SELECT * 
FROM EVENTS
WHERE MATCH (title) AGAINST ('second test' IN BOOLEAN MODE);

      

I am returning 2 lines; those that contain "test event" and "second test".

It looks like the word "second" cannot be searched or should be avoided in some way. Did I miss something?

+2


a source to share


2 answers


Yes, second is a stop word and will run. (You can override this behavior)



+1


a source


Yup, this is a stopwatch:

Full text stock words



if you have access to mySQL server you can modify the stoplist file as described here . If it's a shared server, you might be out of luck.

+1


a source







All Articles