http://stackoverflow.com/questions/2526407/complex-query-with-sphinx

比如要实现和如下sql代码相同的功能:

SELECT * FROM table
WHERE yescolumn = 'query'
AND othercolumn not like '%keyword%'

You can use Sphinx's extended query syntax to pick the fields you want to search. Try running a query through Sphinx like this:

@yescolumn query @othercolumn -keyword

So in a PHP page you might have a link to a Sphinx database named $sphinx:

$sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);
$results = $sphinx->Query('@yescolumn query @othercolumn -keyword');

更多信息看sphinx的文档关于searching的部分。

sphinx分域搜索的更多相关文章

  1. sphinx分域搜索【不】需要在conf文件中使用sql_field_string

    请看sql_field_string的文档说明: # combined field plus attribute declaration (from a single column) # stores ...

  2. yii中sphinx,Ajax搜索分页

    效果图: 控制器: <?phpnamespace backend\controllers; use Yii;use yii\web\Controller;use yii\data\Paginat ...

  3. yii2 sphinx Ajax搜索分页 关键词的缓存

    控制器层 <?php namespace frontend\controllers; use Yii; use yii\web\Controller; //use frontend\models ...

  4. (转) sphinx 高亮显示搜索词

    http://hi.baidu.com/tewuapple/item/7a7bc34adbda24a8df2a9fe5  (转)

  5. [转]Sphinx+Mysql+中文分词安装-实现中文全文搜索

    From : http://blog.csdn.net/lgm252008/article/details/5373436 1.什么是SphinxSphinx 是一个在GPLv2 下发布的一个全文检索 ...

  6. sphinx教程

    http://www.php100.com/html/it/focus/2013/0916/6188.html### 以上一篇的email数据表为例: 数据结构: 01.CREATE TABLE em ...

  7. Sphinx和coreseek检索引擎

    Sphinx是检索英文用,coreseek是检索中文用. Sphinx(斯芬克斯)是一个基于SQL的全文检索引擎,可以结合MySQL,PostgreSQL做全文搜索,它可以提供比数据库本身更专业的搜索 ...

  8. sphinx 源码阅读之分词,压缩索引,倒排——单词对应的文档ID列表本质和lucene无异 也是外部排序再压缩 解压的时候需要全部扫描doc_ids列表偏移量相加获得最终的文档ID

    转自:http://github.tiankonguse.com/blog/2014/12/03/sphinx-token-inverted-sort.html 外部排序 现在我们的背景是有16个已经 ...

  9. sphinx

    1.什么是SphinxSphinx 是一个在GPLv2 下发布的一个全文检索引擎,商业授权(例如, 嵌入到其他程序中)需要联系我们(Sphinxsearch.com)以获得商业授权.一般而言,Sphi ...

随机推荐

  1. 消除警告"property access result unused - getters should not be used for side effects"

    我写了如下一段代码: - (void)btnClicked:(UIButton *)button { switch (button.tag) { : self.initShare; break; de ...

  2. 正则表达式 替换 <img > 标签

    /** * 正则表达式过滤<img > 标签 * @param str * @return */ public static String cutOutImgPrefix(String s ...

  3. sipcal

    sudo apt-get install sipcalc sipcalc 10.120.148.xx/20

  4. Spring框架_代理模式(静态代理,动态代理,cglib代理)

    共性问题: 1. 服务器启动报错,什么原因? * jar包缺少.jar包冲突 1) 先检查项目中是否缺少jar包引用 2) 服务器: 检查jar包有没有发布到服务器下:                 ...

  5. mysql、sqlserver数据库常见数据类型对应java中的的类型探究

    由于本次测试表的结构不涉及到主键的自增长,所以mysql.sqlserver建表语句相同: CREATE TABLE testType ( id INT NOT NULL DEFAULT 0, gen ...

  6. json处理三部曲之第三曲:利用Gson处理json

    需要导入gson-xxx.jar包 <dependency> <groupId>com.google.code.gson</groupId> <artifac ...

  7. C# WebService 概念,创建及引用调用

    1.1.Web Service基本概念 Web Service也叫XML Web Service WebService是一种可以接收从Internet或者Intranet上的其它系统中传递过来的请求, ...

  8. 使用非 GUI 模式运行 JMeter 压力测试

    使用非 GUI 模式,即命令行模式运行 JMeter 测试脚本能够大大缩减所需要的系统资源.使用命令jmeter -n -t <testplan filename> -l <list ...

  9. Chapter 2 Open Book——10

    I sent that, and began again. 我发送了它,然后又一次重新开始写了. Mom,Everything is great. Of course it's raining. I ...

  10. 关于getchar()的知识

    char* s1 = "123",字符串"123"这段内存是只读的,就是说其内容不能改变///char *s 这个是指申请一个地址空间 记录一个地址 #incl ...