我正在尝试为我的网站使用Sphinx RT索引。除了中缀搜索之外,一切都可以正常工作。
index rt
{
type = rt
path = /var/lib/sphinxsearch/data/rt.sph
rt_field = name
rt_field = address
rt_field = keyword
rt_attr_uint = type
min_word_len = 1
min_infix_len = 3
enable_star = 0
html_strip = 0
inplace_enable = 0
charset_type = utf-8
}我在rt索引中插入了一些值。示例:
Insert into rt(id,name,address,keyword,type) values(100,'JohnRambo','Newyork','assassin',1);现在,当我搜索“JohnRambo”时,它会返回正确的结果。但是,当我搜索“John”或“Rambo”时,它给出的结果集为空。
mysql> select * from rt where match('John');
Empty set (0.00 sec)我是不是漏掉了什么?任何帮助都是非常感谢的!
发布于 2013-07-17 18:34:07
中缀/前缀搜索需要RT索引上的dict=keywords。
https://stackoverflow.com/questions/17693700
复制相似问题