0

I have an issue when executing a query with using MATCH AGAINST. I am using view for combining tables results and then I run a query on that view. The issue is that the query runs just fine in MariaDB 10.1, but the same query throws this error in Mysql 5.7:

Can't find FULLTEXT index matching the column list

NOTICE: I have all of the corresponding fulltext indexes set, the table format is InnoDB.

Edit: this is my query:

View:

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 query:

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

I would appreciate any kind of help

Katerina
  • 99
  • 1
  • 12
  • Please add the schema, we cant use our divination skills here. https://meta.stackoverflow.com/questions/333952/why-should-i-provide-an-mcve-for-what-seems-to-me-to-be-a-very-simple-sql-query – Daniel E. Jan 10 '19 at 09:20
  • @DanielE Thank you. I have updated my question – Katerina Jan 10 '19 at 09:34

0 Answers0