sphinx\Query match()

match() public method

Sets the fulltext query text. This text will be composed into MATCH operator inside the WHERE clause.

Note: this value will be processed by yii\sphinx\Connection::escapeMatchValue(), if you need to compose complex match condition use yii\db\Expression:

$query = new Query();
$query->from('my_index')
    ->match(new Expression(':match', ['match' => '@(content) ' . Yii::$app->sphinx->escapeMatchValue($matchValue)]))
    ->all();
public $this match ( $query )
$query string|yii\db\Expression|yii\sphinx\MatchExpression

Fulltext query text.

return $this

The query object itself.

doc_Yii
2016-10-30 17:12:20
Comments
Leave a Comment

Please login to continue.