hi,
a boolean mode full text search doesn't sort automaticly as stated in the docs, but it also isn't possible to select the match value (the score) any more. (is is always 1)
consider this query;
SELECT id, titel, MATCH (titel) AGAINST ('mozart') AS score FROM cmp_composities WHERE MATCH (titel) AGAINST ('mozart')
+------ +------------------------------------------------------------------- +-----------------+
| id | titel | score |
+------ +------------------------------------------------------------------- +-----------------+
| 2692 | 11F?nf Variationen ?ber das Lied 'Komm, lieber Mai' von Mozart. | 7.1844596862793 |
| 3422 | Variaties en Fuga op een thema van Mozart, opus 132a, voor piano. | 7.1087989807129 |
+------ +------------------------------------------------------------------- +-----------------+
SELECT id, titel, MATCH (titel) AGAINST ('moz*') AS score FROM cmp_composities WHERE MATCH (titel) AGAINST ('moz*' IN BOOLEAN MODE)
now boolean;
+------ +------------------------------------------------------------------- +-------+
| id | titel | score |
+------ +------------------------------------------------------------------- +-------+
| 3422 | Variaties en Fuga op een thema van Mozart, opus 132a, voor piano. | 0 |
| 2692 | 11F?nf Variationen ?ber das Lied 'Komm, lieber Mai' von Mozart. | 0 |
+------ +------------------------------------------------------------------- +-------+
the selection is correct, but the score not, (the match was not done in boolean mode)
so, i try again with both matches in boolean mode
SELECT id, titel, MATCH (titel) AGAINST ('moz*' IN BOOLEAN MODE) AS score FROM cmp_composities WHERE MATCH (titel) AGAINST ('moz*' IN BOOLEAN MODE)
+------ +------------------------------------------------------------------- +-------+
| id | titel | score |
+------ +------------------------------------------------------------------- +-------+
| 3422 | Variaties en Fuga op een thema van Mozart, opus 132a, voor piano. | 1 |
| 2692 | 11F?nf Variationen ?ber das Lied 'Komm, lieber Mai' von Mozart. | 1 |
+------ +------------------------------------------------------------------- +-------+
Now, the score is 1 no matter what (boolean) search i do the score now always return 1
This seems not the intended behavior? is is not possible to get the score on BOOLEAN searches? That would explain why it doesn't sort on score... but perhaps the documentation should say you don't get scores with boolean searches...
or am i mistaking, in which case i take back my words...
runnning mysql 4.0.20 on os x server 10.3.5
thx 4 any help
bas