$search="naked ladies";
$search_rs=mysql_query("select *,
match (`event_title`,`event_description`) against ('$search') AS score
from `li_events` e LEFT JOIN `li_cats` c on e.cat_id=c.idc
WHERE MATCH (`event_title`,`event_description`) against ('$search')
ORDER BY score DESC");
of the two columns searched event_title and event_description, i want event_title to be twice as important, maybe more..
i could be wrong so if i am please be sure to correct me but...one column more important than the next? i dont think you can achieve that...the relevance of importance with full text search is more the "match" that "wear you got the match". You probably might want to make a full text search out of each individual column to isolate the search and probably do a ordery by on the column score (i dunno if that will work)
Again...im not sure of this in the first place...its just my theory
Fulltext searching uses an fulltext index. Columns are moot once their data is put into an index. I've never tried this, but when you add your fulltext index, try adding the title field to it twice, and the description field to it once.
Failing that, you might have to do what ~kendall said & have multiple fulltext indices.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
pickle wrote:Fulltext searching uses an fulltext index. Columns are moot once their data is put into an index. I've never tried this, but when you add your fulltext index, try adding the title field to it twice, and the description field to it once.
Failing that, you might have to do what ~kendall said & have multiple fulltext indices.
I was actually thinking of having two title columns, obviously more of a hack than anything! your way seems a far more sensible way of doing it, I shall try it tomorrow at work, thank you very much!