MySQL’s Fulltext Relevance Ranking

MySQL's fulltext searching makes use of 'Term Vector Theory', which basically means calculating word distances using three dimensional vectors. Go here for a more thorough explanation of term vector theory.

As a bit of an excuse to have a mess about with the \LaTeX plugin I just installed into WordPress, I thought that I would show MySQL's formula for fulltext searching here:


w = \frac{log(tf)+1}{stf}\frac{U}{1+0.0115U}log\frac{N-nf}{nf}

Where w is the weight calculated,
tf is the frequency of occurence of terms in row,
stf is the sum log(tf)+1 for all terms in the same row,
U is the number of unique terms in the row,
N is the number of rows, and,
nf is the number of rows that contain the term.

For more information about MySQL's fulltext search ranking, take a look here at the MySQL Internals Manual...

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • co.mments
  • del.icio.us
  • digg
  • Fark
  • Furl
  • Reddit
  • Spurl
  • TailRank
  • YahooMyWeb

About this entry