sphinxQl获取查询日志

时间:2013-03-04 10:26:24

标签: sphinx

使用SphinxQl,在执行此查询时,我收到以下错误

  select fieldname from indexname where height >= 165.25 and height <= 175.25 OR Age >=51;
 ERROR 1064 (42000): sphinxql: syntax error, unexpected OR, expecting $end near 'OR Age >=51'

 select fieldname from indexname where (height >= 165.25 and height <= 175.25) OR Age >=51;

ERROR 1064 (42000): sphinxql: only >=, <=, and BETWEEN floating-point filter types are supported in this version near '(height >= 165.25 and height <= 175.25) OR Age >=51'

预先谢谢,请建议

1 个答案:

答案 0 :(得分:1)

尝试类似

的内容
SELECT fieldname, IF( (height >= 165.25 AND height <= 175.25) OR Age >=51, 1, 0)
AS myfilter FROM indexname WHERE myfilter = 1

Sphinx可以执行'OR',它们实际上不能在WHERE子句中。

相关问题