请看sql_field_string的文档说明: # combined field plus attribute declaration (from a single column) # stores column as an attribute, but also indexes it as a full-text field # # sql_field_string = author 我们不需要attribute属性,不用管.只要在sql_query中选出相应的column就行了,就可以在p…
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 sear…
控制器层 <?php namespace frontend\controllers; use Yii; use yii\web\Controller; //use frontend\models\Zhan; use yii\data\Pagination; use SphinxClient; use yii\db\Query; use yii\widgets\LinkPager; use yii\caching\MemCache; class SphinxController extends C…