doubi8383 2017-11-23 10:25
浏览 46

错误:sphinx查询中的未知密钥名称“CONCAT_WS”

I am new in sphinx and mysql and trying to execute simple query as shown below

sql_query               = \
                (SELECT users.id AS uid, \ 
                CONCAT_WS(' ', users.fname, users.lname, users.email) AS data \
                FROM users) \
                UNION ALL \
                (SELECT documents.id AS diid, documents.description \
                FROM documents);

But I am getting below error CONCAT_WS on indexing command

ERROR: unknown key name 'CONCAT_WS' in /etc/sphinxsearch/sphinx.conf line 12 col 26. FATAL: failed to parse config file '/etc/sphinxsearch/sphinx.conf'

  • 写回答

1条回答 默认 最新

  • duanchandun1860 2017-11-23 11:55
    关注

    You have a space AFTER the slash on the line before

                (SELECT users.id AS uid, \ 
                                 ---------^
    

    So Sphinx thinks the CONCAT_WS is starting a whole new line, rather than just continuing the line before.

    The slash shouldn't have ANYTHING after it - as it's meant to be 'escaping' the end of line itself.

    评论

报告相同问题?

悬赏问题

  • ¥20 蓝牙耳机怎么查看日志
  • ¥15 R语言 拟时序分析降维图如何减少分支
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统