Java SphinxQL通配符
我想在我的项目中使用sphinx。我想使用RT索引和sphinxQL。但是我不能使用通配符查询。有人有什么建议吗 这是我的sphinx.conf: 索引测试Java SphinxQL通配符,java,sphinx,wildcard,Java,Sphinx,Wildcard,我想在我的项目中使用sphinx。我想使用RT索引和sphinxQL。但是我不能使用通配符查询。有人有什么建议吗 这是我的sphinx.conf: 索引测试 { type = rt path = /usr/local/sphinx/var/data/testrt charset_type = utf-8 min_infix_len = 1
{
type = rt
path = /usr/local/sphinx/var/data/testrt
charset_type = utf-8
min_infix_len = 1
enable_star = 1
rt_field = name
rt_attr_string = game
}
查询正常,1行受影响0.02秒
mysql> select * from testrt;
+---+----+----+
|id |重量|游戏|
+---+----+----+
|1 | 1 |斯芬克斯|
+---+----+----+
设置为1行0.01秒
mysql> select * from testrt where match('sphinx');
+---+----+----+
|id |重量|游戏|
+---+----+----+
|1 | 1500 |斯芬克斯|
+---+----+----+
设置为1行0.00秒
mysql> select * from testrt where match('sphin*');
mysql> select * from testrt where match('sphin\\*');
空置0.00秒
mysql> select * from testrt where match('sphin*');
mysql> select * from testrt where match('sphin\\*');
空集0.02秒
我希望你能帮我一个忙。谢谢 需要dict=关键字进行前缀匹配才能处理rt索引
注意目前只支持前缀搜索,中缀在rt索引上不起作用需要dict=关键字进行前缀匹配才能在rt索引上工作
注意,现在只支持前缀搜索,中缀在rt索引上不起作用不应该是%而不是*?Sphinx使用*作为通配符。Mysql类使用%而不是*?Sphinx使用*作为通配符。Mysql-LIKE使用%