我有这个mysql查询
SELECT * FROM object_data WHERE MATCH(
object_data.personal_info,
object_data.experience,
object_data.position_preferred
) AGAINST ('Building Hotel' IN BOOLEAN MODE)
你看我有#34;建筑酒店"。我想搜索building
和hotel
,无论它们是什么列,只要它们连续存在。我的查询会发生什么,它列出了至少有一个关键字的所有行。
与此类似:
columnName = "Building" AND columnName = "Hotel"
有什么建议吗?
答案 0 :(得分:1)
试试这个
SELECT MATCH(object_data.personal_info, object_data.experience,object_data.position_preferred) AGAINST ('Building
Hotel') as Relevance FROM object_data WHERE MATCH
('Building
Hotel') AGAINST('+Building +Hotel' IN
BOOLEAN MODE) HAVING Relevance > 0.2 ORDER
BY Relevance DESC