如何在狮身人面像配置源 sql 中为多个字段设置分组依据


How to set group by for multiple fields in sphinx config source sql

我需要为我的狮身人面像配置源sql中的多个字段设置分组依据。

select f1,f2,f3,f5 from table group by f2,f3,f5;

像这样我需要sql

为此,我创建了这样的源代码

source myindex
{
    type            = mysql
    sql_host        = localhost
    sql_user        = root
    sql_pass        = root
    sql_db          = mydb
    sql_port        = 3306  # optional, default is 3306
    sql_query = '
    select f1,f2,f3,f4 from table;
    sql_group_column = f2;
    sql_group_column = f3;
    sql_group_column = f4;
}
我的

我知道我的配置文件是否正确?

WARNING: key 'sql_group_column' is deprecated in /etc/sphinx/sphinx.conf line 27; use 'sql_attr_uint' instead

我的狮身人面像版本是204。现在我在旋转索引时收到此错误。

更改

sql_group_column = f2;
sql_group_column = f3;
sql_group_column = f4;

sql_attr_uint = f2;
sql_attr_uint = f3;
sql_attr_uint = f4;

或者对不同的属性类型f2、f3、f4使用狮身人面像属性