I have a database with various tables. I want to search through the database and sort via relevance. I've learned that fulltext search will make my job very simple. I then decided I'd make fulltext search easier, and just smash everything into one table, with that ID linking to other tables. So basically I've got this:
Code: Select all
Table: fileKeywords
,------,--------------------------------------------------,
| ID | keywords |
|------|--------------------------------------------------|
| x | *content of row* |
'------'--------------------------------------------------'
What I'm interested in is the fulltext query I'll have to create. From my understanding, it'll have to be like this:
Code: Select all
SELECT id FROM fileKeywords WHERE MATCH (keywords) AGAINST (query WITH QUERY EXPANSION) AS score FROM fileKeywords WHERE MATCH (keywords) AGAINST (query);
I'm new to this search thing...