在MySQL 5.7中找不到与列列表匹配的FULLTEXT索引

时间:2019-01-10 09:14:08

标签: mysql full-text-indexing match-against fulltext-index

使用MATCH AGAINST执行查询时出现问题。我正在使用视图来合并表结果,然后在该视图上运行查询。问题是查询在MariaDB 10.1中运行得很好,但是同一查询在Mysql 5.7中抛出此错误:

  

找不到与列列表匹配的FULLTEXT索引

注意:我已经设置了所有相应的全文索引,表格式为InnoDB。

编辑:这是我的查询:

查看:

CREATE VIEW companies_search AS
SELECT c.*,  ci.city_id, ci.city_title, ci.city_title_eng, adr.address_street 
FROM `companies` as c
LEFT JOIN `addresses` as adr ON adr.`company_id` = c.`company_id`
LEFT JOIN `cities` as ci ON ci.`city_id` = adr.`city_id`

选择查询:

SELECT c.*, ( score_city * 0.05 + topscore_city * 50 + score_city_e * 0.05 + topscore_city_e * 50 ) as sumar 
FROM (SELECT *, 
MATCH(city_title) AGAINST ('"Lond"' IN BOOLEAN MODE) AS topscore_city, 
MATCH(city_title) AGAINST ('Lond' IN BOOLEAN MODE) AS score_city, 
MATCH(city_title_eng) AGAINST ('"Lond"' IN BOOLEAN MODE) AS topscore_city_e, 
MATCH(city_title_eng) AGAINST ('Lond' IN BOOLEAN MODE) AS score_city_e 
FROM `companies_search` GROUP BY company_title_eng) as c 
HAVING sumar > 0 
ORDER BY sumar DESC LIMIT 25 OFFSET 0

我将不胜感激

0 个答案:

没有答案