我有一个包含两个表的全文目录.
tableA在目录中索引了4列(a1,a2,a3,a4),a2,a3,a4.a1是主键.
tableB有3列(b1,b2,b3,b4),其中两列在目录中被索引,b3和b4.b1是该表的PK,b2是表A的FK.
我想做点什么
SELECT *, (ftTableA.[RANK] + ftTableB.[RANK]) AS total_rank FROM tableA INNER JOIN tableB ON tableA.a1=tableB.b2 INNER JOIN FREETEXTTABLE(tableA, (a2,a3,a4), 'search term') as ftTableA ON tableA.a1=ftTableA.[KEY] INNER JOIN FREETEXTTABLE(tableB, (b3,b4), 'search term') as ftTableB ON tableB.11=ftTableB.[KEY]
但这不起作用......我可以让单个表工作,例如.
SELECT *, (ftTableA.[RANK] + ftTableB.[RANK]) AS total_rank FROM tableA INNER JOIN FREETEXTTABLE(tableA, (a2,a3,a4), 'search term') as ftTableA ON tableA.a1=ftTableA.[KEY]
但从不超过一张桌子.
有人可以给出对多个表进行全文搜索所需步骤的解释和/或示例.