权重列不会出现在搜索结果中

时间:2015-05-28 14:12:21

标签: sphinx

我正在学习Sphinx的书籍“Introduction to Search with Sphinx”和第一个带有测试数据的查询:

mysql> select * from test1 where match('test');

应该产生这个输出:

enter image description here

但这是我得到的输出:

enter image description here

为什么我的结果中缺少重量列?

1 个答案:

答案 0 :(得分:1)

SphinxQL用于做很多事情,其中​​一个是根据查询自动添加列。但是决定魔术行为经常混淆程序(不确定列是否存在)

...所以现在,只有你明确要求它们才会有列(尽管仍然可以使用*作为id +属性)

mysql> select *,weight() as weight from test1 where match('test');