我在同一个错误中看到了很多类似的问题,解决方案是通过向列添加FULLTEXT
来改变表格。
但现在问题是我将查询写入VIEW
而不是表格。因此,我无法改变我所经历的解决方案中提到的列。
那么在查询VIEW
时如何解决此问题。
查看:
CREATE OR REPLACE VIEW result AS select p.f_name AS fullname,
p.experience AS experience,
group_concat(distinct s.name
order by s.name ASC separator ', ') AS skills,
p.location AS location from (personal p left join
reg r on((p.reg_id = r.id)))
left join prof_skill ps on((r.id = ps.reg_id)) left join skills s
on((ps.skill_id = s.id)) group by r.id ;
全文查询:
SELECT `registration_no`, `location`, `skills`, `fullname`, `experience`, `active`
FROM `result`
LEFT JOIN `review` ON `result`.`registration_no` = `review`.`reg_id` AND
`review`.`active` = 0
WHERE ( MATCH (fullname,experience,skills,location)
AGAINST ('+henna' IN BOOLEAN MODE) )
AND (`result`.`active` =0 ) GROUP BY `registration_no`
结构:
INDEXES: