是否可以在sphinx sphinx中执行简单的"OR“搜索?下面是一个用伪代码编写的小示例。
define_index do
...
has :attr_a, :attr_b
end
Object.search @q, :conditions => {...some cond...}, :with => {:attr_a => value_a OR :attr_b => value_b}谢谢
发布于 2011-07-02 10:13:28
这是可能的,尽管它比大多数查询稍微复杂一些-您需要使用Sphinx的select查询来完成它。docs cover this situation。
https://stackoverflow.com/questions/6551427
复制相似问题