Relevance Ranking
The relevance score is based on TF-IDF: higher scores for rare words and words appearing in fewer rows. Use ORDER BY score DESC for ranked results.
The relevance score is based on TF-IDF: higher scores for rare words and words appearing in fewer rows. Use ORDER BY score DESC for ranked results.
SELECT
title,
MATCH(title, body) AGAINST('indexing strategies') AS score
FROM articles
WHERE MATCH(title, body) AGAINST('indexing strategies')
ORDER BY score DESC
LIMIT 5;
-- Score 0 means not matched; higher = more relevant
Words in 50%+ of rows score 0 in natural language mode — too common to be useful.