-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xunsearch是否支持同一个字段的两次range搜索 #28
Comments
可以吧。 Best Regards hightman/海鳗 微信/微博:hightman
|
@hightman 问过国外的论坛,在Xapian上是可以直接支持age:15..25 OR age:35..45这种搜索语句的。但是我用XunSearch不可以,我是在增加一些索引后,在demo上测试的,如下:
上面这条语句,OR前面或后面都可以单独查询出结果,但是一起就没有结果了。 |
你可以用 XSSearch:addRange 啊,放在 query 里解析似乎 不会成功。 Best Regards hightman/海鳗 微信/微博:hightman
|
@hightman 但是addRange两次,是AND关系,或者有地方设置默认的关系?
|
确实不行,add range 固定为 op_filter 关系 (即AND) Best Regards hightman/海鳗 微信/微博:hightman
|
@hightman 好的,谢谢,那我研究一下Xapian和其PHP接口,您觉得有可能实现我想要的功能吗?如果有可能我们可以放到XunSearch中。 |
自己构建 Xapian::Query 肯定可以啊,只是xs这要相互通讯有点麻烦。xs每次add query都是在基础query上,而不能分离它们。 比如:当前是 q1,此时添加为 q1 and q2,再以or 添加 q3 就变成 (q1 AND q2) OR q3 而无法做到 q1 AND (q2 OR q3) Best Regards hightman/海鳗 微信/微博:hightman
|
@hightman 好的,我来尝试一下,我给您的邮箱发了我的微信,希望微信能让沟通效率高一点。我现在正在CentOS 7上装Xapian. |
xunsearch是否支持同一个字段的两次range搜索?比如,有个字段是age,我能否这样搜索:10 < age < 15 and 20 < age < 25?
The text was updated successfully, but these errors were encountered: