您当前的位置:首页 > 计算机 > 软件应用 > 数据库 > 其它

Sphinx 警告 WARNING: attribute 'id' not found - IGNORIN

时间:12-14来源:作者:点击数:

Sphinx 建立索引时提示错误:

WARNING: attribute 'id' not found - IGNORING

原因:Sphinx 不能使用主键来做属性字段,你的索引配置文件中一定用了类似:

sql_attr_uint = id # id 为表的主键

解决方法,去掉

sql_attr_uint = id

或改为

sql_query = SELECT id,id as aid,body from table
sql_attr_uint = aid

即:在 sql_query 中给 id 用 as 重新命个名子。

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐