我正在使用带有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;