总和匹配相关性不起作用

时间:2016-09-23 14:17:32

标签: mysql symfony doctrine-orm sql-order-by

我正在使用带有Doctrine的Symfony2.7。我的查询工作没有在ORDER BY部分中进行相关性的总和。

有什么问题? Doctrine不支持一笔款项吗?

SELECT s.shopArticleId as article_id, 
   MATCH (s.soundex, s.categorySoundex) AGAINST ('T200') AS relevance1,
   MATCH (s.soundex, s.categorySoundex) AGAINST ('A530') AS relevance2

FROM FrontendMainBundle:Search s 

WHERE MATCH (s.soundex, s.categorySoundex) AGAINST ('T200') > 0 
AND MATCH (s.soundex, s.categorySoundex) AGAINST ('A530') > 0 

ORDER BY (relevance1 + relevance2) DESC; 

0 个答案:

没有答案