狮身人面像搜索问题

时间:2011-05-15 11:29:30

标签: mysql sphinx

group by和count在sphinx search v 2.0.1B中不起作用,为什么?

mysql> select count(*) from my_index group by myattr;
ERROR 1064 (42000): sphinxql: syntax error, unexpected FROM, expecting IDENT near 'from my_index group by myattr'

只是在没有计数的情况下分组。

1 个答案:

答案 0 :(得分:1)

试试这个。

select count(*) as cnt from my_index group by myattr;