tags:

views:

162

answers:

1

In order to give different columns different weights,of course one can use:

select   ... 
from     table_name 
where    match(column1,column2...columnn) against('+test..') 
order by weight1*(match (column1) against('test..')) 
       + weight2*(match (column2) against('+test..')) 
       + ...
       + weightn*(match (column1) against('test..'))

But when the result size is big,the above order by can be extremely costive!

Is there any more efficient way to do this?

+1  A: 

use thinking sphinx, http://freelancing-god.github.com/ts/en/

MatthewFord