Sphinx:sphinxql中的OR运算符

时间:2018-07-15 14:29:58

标签: sphinx sphinxql

我的数据库中有一个日期字段(Start_date),已在sphinx中将其索引为sql_field_string,其格式如下:2000-12-12。 当我想在该字段上搜索时,我将提交这样的查询:

select * from all where match ('@Start_date 2000-12-12'); 

并且可以正常工作,但是在使用OR 运算符提交查询时遇到了麻烦,该运算符不返回任何结果,而实际上却有很多结果:

select * from all where match ('@Start_date 2000-12-12 | 1999-12-12');

当我使用括号作为值时,问题已解决!

select * from all where match ('@Start_date (2000-12-12) | (1999-12-12)');

为什么会这样?

(我已经在字符集表中添加了'-'字符)。

来自sphinx.conf文件:

dict = crc
min_infix_length=3

0 个答案:

没有答案