I'm getting results that are hard to understand. I hope that someone will be able to shade some light on the subject.
I have a very simple table in mysql:
id| text 1 | testA testB testC 2 | testA testB
When I run the following query:
SELECT id, MATCH (text) AGAINST ('+(+testA testB) +testC' IN BOOLEAN MODE) as score FROM test_fulltext
I get the following incorrect results (note that the second row should return 0)
id| score 1 | 1,1666667461395 2 | 0,66666668653488
However when I run as slightly modified version of the query (no '+' sign before testA):
SELECT id, MATCH (text) AGAINST ('+(testA testB) +testC' IN BOOLEAN MODE) as score FROM test_fulltext
I get correct result:
id| score 1 | 1,3333333730698 2 | 0
Do you have any idea why the first query matches the second row? It does that on both mysql 4.1 and 5.0.5.
Do you know where I can find the source code that parses full text queries? Or any other source of information that explains how this is calculated. Any help is welcome.