MySQL Full Text Search Custom Sort Logic

Viewed 17

If I search like AGAINST ('word1 word2 word3' IN BOOLEAN MODE) how can I have the results to be sorted based on number of unique words found in row?

For example: ( expected result )

  1. row1 - all words
  2. row2 - word1 and word2
  3. row3 - word1 and word3
  4. row4 - word3

... etc

0 Answers
Related