title: Best way to do a weighted search over multiple fields in mysql?
body: <p>Here's what i want to do:</p>
  
  <ul>
  <li>match a search subject against multiple fields of my table</li>
  <li>order the results by importance of the field and relevance of the matching (in that order)</li>
  </ul>
  
  <p>Ex: let's assume I have a blog. Then someone searches for "php". The results would appear that way:</p>
  
  <ul>
  <li>first, the matches for the field 'title', ordered by relevance</li>
  <li>then, the matches for the field 'body', ordered by relevance too</li>
  <li>and so on with the specified fields...</li>
  </ul>
  
  <p>I actually did this with a class in PHP but it uses a lot of UNIONS (a lot!) and grows with the size of the search subject. So I'm worried about performance and DOS issues. Does anybody has a clue on this?</p>