0

This is my filter text:

Oliver used book

If I search for 'Oliver' it works, if I search for 'book' it works but if I search for 'used' it does not work.

Heater white fan HEOP1322

Heater -> works : white -> works : fan -> does not work : HEOP -> does not work : HEOP1322 -> works.

My query is like this:

SELECT * FROM table WHERE MATCH(filter) AGAINST ('fan' IN BOOLEAN MODE)
SELECT * FROM table WHERE MATCH(filter) AGAINST ('HEOP' IN BOOLEAN MODE)
SELECT * FROM table WHERE MATCH(filter) AGAINST ('used' IN BOOLEAN MODE)

Why d'hell does the word used not work and the word book works? They have the same length.

I also tried this suggestions Mysql search for string and number using MATCH() AGAINST() without success.

Edit: Solved, follow this instructions. XAMPP MySQL - Setting ft_min_word_len

Community
  • 1
  • 1
user3243925
  • 271
  • 2
  • 4
  • 12

1 Answers1

1

"used" is one of the default MySQL full text stopwords: https://dev.mysql.com/doc/refman/5.1/en/fulltext-stopwords.html. Stopwords are words which are ignored because they are too frequent in the (English) language and would not positively contribute to the result of a full text search. If you're only querying for single words, a LIKE %..% query may be more suited than a full-blown full text search.

deceze
  • 510,633
  • 85
  • 743
  • 889
  • Ok that answers one problem. I also read that the minimum lenght is 4, and to ignore it I should use + before the word. `+fan` continues not to work. – user3243925 Feb 10 '14 at 11:44