Comments (8)
可以吧。
Best Regards
hightman/海鳗
微信/微博:hightman
Github:https://github.com/hightman
在 2016年1月13日,下午3:46,Rafael Gu [email protected] 写道:
xunsearch是否支持同一个字段的两次range搜索?比如,有个字段是age,我能否这样搜索:10 < age < 15 and 20 < age < 25?
—
Reply to this email directly or view it on GitHub #28.
from xunsearch.
@hightman 问过国外的论坛,在Xapian上是可以直接支持age:15..25 OR age:35..45这种搜索语句的。但是我用XunSearch不可以,我是在增加一些索引后,在demo上测试的,如下:
util/Quest.php demo "chrono:1314336167..1314337169 OR chrono:1314341167..1314343169"
上面这条语句,OR前面或后面都可以单独查询出结果,但是一起就没有结果了。
from xunsearch.
你可以用 XSSearch:addRange 啊,放在 query 里解析似乎 不会成功。
Best Regards
hightman/海鳗
微信/微博:hightman
Github:https://github.com/hightman
在 2016年1月19日,上午10:25,Rafael Gu [email protected] 写道:
@hightman https://github.com/hightman 问过国外的论坛,在Xapian上是可以直接支持age:15..25 OR age:35..45这种搜索语句的。但是我用XunSearch不可以,我是在增加一些索引后,在demo上测试的,如下:
util/Quest.php demo "chrono:1314336167..1314337169 OR chrono:1314341167..1314343169"
上面这条语句,OR前面或后面都可以单独查询出结果,但是一起就没有结果了。—
Reply to this email directly or view it on GitHub #28 (comment).
from xunsearch.
@hightman 但是addRange两次,是AND关系,或者有地方设置默认的关系?
require '/usr/local/xunsearch/sdk/php/lib/XS.php';
$xs = new XS('demo');
$search = $xs->search;
$search->setQuery('');
$search->addRange('chrono', 1314336167, 1314337169);
$search->addRange('chrono', 1314341167, 1314343169);
$docs = $search->search();
foreach($docs as $doc) {
echo $doc->pid . ' ';
echo $doc->subject . ' ';
echo $doc->message . ' ';
echo $doc->chrono . '<br/>';
}
from xunsearch.
确实不行,add range 固定为 op_filter 关系 (即AND)
parse_query 印象中是不支持2次的。
Best Regards
hightman/海鳗
微信/微博:hightman
Github:https://github.com/hightman
在 2016年1月19日,下午2:39,Rafael Gu [email protected] 写道:
@hightman https://github.com/hightman 虽然没试过,但是addRange两次,是OR关系还是AND关系呢?想到这个就觉得addRange是不是有问题?或者有地方设置默认的关系?
—
Reply to this email directly or view it on GitHub #28 (comment).
from xunsearch.
@hightman 好的,谢谢,那我研究一下Xapian和其PHP接口,您觉得有可能实现我想要的功能吗?如果有可能我们可以放到XunSearch中。
from 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
Github:https://github.com/hightman
在 2016年1月19日,下午4:55,Rafael Gu [email protected] 写道:
@hightman https://github.com/hightman 好的,谢谢,那我研究一下Xapian和其PHP接口,您觉得有可能实现我想要的功能吗?如果有可能我们可以放到XunSearch中。
—
Reply to this email directly or view it on GitHub #28 (comment).
from xunsearch.
@hightman 好的,我来尝试一下,我给您的邮箱发了我的微信,希望微信能让沟通效率高一点。我现在正在CentOS 7上装Xapian.
from xunsearch.
Related Issues (20)
- 请教一下是否可以支持其他第三方进程守护工具守护进程? HOT 1
- Possible Code injection Vulnerability HOT 1
- indexer索引管理器 可以支持一下 增量索引吗? HOT 2
- getLastCount20条数据都误差在3条 HOT 3
- php 8.1 support HOT 2
- None of database avaiable(S#506)
- 有考虑直接使用json通讯吗?
- 通过getLastCount获取数据存在误差 HOT 1
- 标点符号问题 HOT 2
- 搜索分词的BUG
- 经常出现 (prompt after a while) fsockopen(): unable to connect to 231.42*.**** (Connection timed out) HOT 2
- xunsearch搜不到内容
- 官方的demo搜索居然也不准确 HOT 1
- 写了一套 XS 的教程,希望hightman大佬有时间能来指点一下
- 搜索报错Data/Name too long HOT 1
- 项目挺屌的,就是这个SDK跟不上,能把通讯协议搞个文档吗?
- 你好,使用xunsearch 1.4.17 过程中出现下面的问题
- 建议:在需要发送的结构中使用uint32_t代替所有int并在发送时转为网络序
- 求助。php8.2 下安装出错,php_scws.c:221:6: error: ‘rsrc’ undeclared (first use in this function) HOT 1
- 官网熄火了????? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xunsearch.