coreseek 或者 sphinx 中想要搜索范围咋整?

WBOY
Release: 2016-06-06 20:52:32
Original
1133 people have browsed it

如题,比如我要搜索一个字段 $col > 10。
貌似不支持这样的语法,不知道应该怎么弄。请高人指点。多谢

回复内容:

如题,比如我要搜索一个字段 $col > 10。
貌似不支持这样的语法,不知道应该怎么弄。请高人指点。多谢

php 到接口中有
$sphinxobject->SetFilterRange($col, 10, 1000);
是查找 10到 1000 可以代替一下

//public bool SphinxClient::setFilterRange ( string $attribute , int $min , int $max [, bool $exclude = false ] )
$sphinxobject->SetFilterRange($col, 0, 10, true);
Copy after login

可以考虑使用SphinxQl,where col > 10

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template