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. PHP7编译错误:php编译undefined reference to `libiconv 错误

    ext/gd/libgd/.libs/gdkanji.o: In function `do_convert’: /root/php-5.2.12/ext/gd/libgd/gdkanji.c:350: ...

  2. 在鼠标右键添加“使用WPS打开”

    假设WPS安装在 “D:\Program Files\Kingsoft\WPS Office” 目录下,导入以下注册表内容: Windows Registry Editor Version 5.00 ...

  3. rm删除文件时排除特定文件

    删除当前目录下所有的*.txt文件,但除了test.txt文件: rm `ls *.txt | grep -v test.txt` 或者 rm `ls *.txt | egrep -v test.tx ...

  4. IOS 播放视频 MPMoviePlayerController

    在unity游戏的开头播放视频 , 根据需求 , 最后决定用 MPMoviePlayerController 来实现播放, 实现如下: by Tin 需要在AppController.mm的 Open ...

  5. iOS 上架提示ipad需要显示四个方位,而我们只能竖屏的时候的解决办法

    勾选requires sull screen

  6. 导航条css实现和table实现

    导航条式样 <style type="text/css"> ul,li{ margin:0; padding:0; list-style:none; } #navtop ...

  7. Qt多线程编程总结(一)

    http://blog.csdn.net/mznewfacer/article/details/6965799 QMutex类 一个线程可以锁定互斥量,并且在它锁定之后,其它线程就不能再锁定这个互斥量 ...

  8. perl的logwrapper

    来源: http://www.cnblogs.com/itech/archive/2012/09/22/2698385.html 对任何的函数将标准输出和错误输出重定向到对应的log文件. 对任何的函 ...

  9. iOS中的代理和Block

    一.代理(Delegate) 1)含义 iOS中的代理,比如父母要去上班,到中午12点了,需要给宝宝喂饭吃,但是父母正在上班,这时需要有一个人来帮忙完成一些事情(需要有个保姆来帮忙给宝宝喂饭),此时, ...

  10. asp之FSO大全

    <%Function ShowDriveInfo(strFolder)'显示磁盘信息'strRootFolder="/"'strDrivInfo=ShowDriveInfo( ...