我想使用 Sphinx 来搜索这样的案例:
tags桌子:
id text
1 samsung
2 nokia
3 lg
4 lg.com
5 lg.com.uk
...
如果查询是:
I like lg-> 比赛记录3I like lg.com-> 比赛记录4I like samsung and lg-> 匹配记录1和3
这个想法是查询应该包含列text作为它的子字符串。它类似于LIKESQL 中的运算符,但查询和列的顺序相反:
select * from tags where 'I like samsung and lg' like concat('%', text, '%')
我怎么能在 Sphinx 中做到这一点?谢谢你。