2

I have these two queries

SELECT * FROM `foo` WHERE  MATCH(`title`) AGAINST('knows' in boolean mode )

SELECT * FROM `foo` WHERE  MATCH(`title`) AGAINST('woman' in boolean mode ) 

and in the table I have a row with title = "a woman knows"

the first query finds that row, but the second doesn't! I have experimented with different alternatives - for example, if the title contains "a woman knots" then querying for a match against "knots" works

I am mystified, so any help you can provide would be welcome.

xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
user1104799
  • 161
  • 3
  • 13
  • Why don't you just use `LIKE` ? It's shorter and easier. –  Apr 19 '13 at 08:20
  • If you need to ignore stopwords (like "knows") you could try checking out this other [question and answer](http://stackoverflow.com/questions/12678920/ignoring-mysql-fulltext-stopwords-in-query). – summea Apr 19 '13 at 08:24
  • I would prefer to us 'like' but I need to let the user search for multiple – user1104799 Apr 19 '13 at 14:47

1 Answers1

3

"knows" is a stopword and will not be indexed (and therefore ignored in all searches). You can load your own list of stopwords with the ft_stopword_file server option.

RandomSeed
  • 29,301
  • 6
  • 52
  • 87