【问题标题】:How to use 'OR' condition in sphinxsearch如何在 sphinxsearch 中使用“或”条件
【发布时间】:2018-04-17 10:36:04
【问题描述】:

我尝试使用SELECT * FROM test WHERE status=1 OR attribute=123

但我收到错误ERROR 1064 (42000): sphinxql: syntax error, unexpected OR, expecting $end near

然后,我尝试更改为select *, if(attribute=123 or status=1, 1, 0) as filter from test where filter=1,但它仍然无法在 sphinx_2.2.11 或 sphinx_3.0.3 中工作。我应该怎么做才能实现这个功能?

架构如下:

sql_attr_uint = status sql_attr_multi = attribute

【问题讨论】:

    标签: search full-text-search sphinx


    【解决方案1】:

    Sphinx 尚不支持此功能(最高 3.0.3)。

    Manticore Search(Sphinx 的分支)从 2.4.1 版本开始支持它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-22
      相关资源
      最近更新 更多