Home  >  Article  >  Backend Development  >  coreseek/sphinx 多个查询条件

coreseek/sphinx 多个查询条件

WBOY
WBOYOriginal
2016-06-23 14:13:401204browse

用coreseek/sphinx做全文索引,mysql源,我的sql语句是
select * from tb where a like '%b%' and d like '%e%'
有人说创建一个索引两个全文索引字段
但是我不知道api的地方怎么用
是不是还有其他方法 知道的大虾说一下  谢谢了


回复讨论(解决方案)

在线急等答案啊

太繁?了,你可以下?一?discuz的源?,?照他的做法,他的做法?是很正?的.

这个有办法解决么?

你配置文件里SQL语句用like? 那还用索引搞毛啊。。。

mysql like 效率很低,所以配置文件源定义就是别用那么复杂的where条件,直接取出id ,然后再用ID到数据库取其他字段信息。另外还可以把要用的字段定义到索引文件属性上,这样就不用再去取数据库数据了

建议先学习下:http://www.coreseek.cn/products/products-install/

谢谢你的回答,虽然对我没有用,我用了扩展模式弄的,我的sql语句就是为了说明我要什么样的查询,你想多了。

Statement:
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