sphinx\MatchExpression orMatch()

orMatch() public method Adds an additional MATCH condition to the existing one. The new condition and the existing one will be joined using the 'OR' ('|') operator. See also: match() andMatch() public $this orMatch ( $condition, $params = [] )$condition string|array|yii\db\Expression The new WHERE condition. Please refer to match() on how to specify this parameter. $params array The parameters (name => value) to be parsed into the query. return $this The expression object itself

sphinx\MatchExpression andMatch()

andMatch() public method Adds an additional MATCH condition to the existing one. The new condition and the existing one will be joined using the 'AND' (' ') operator. See also: match() orMatch() public $this andMatch ( $condition, $params = [] )$condition string|array|yii\db\Expression The new MATCH condition. Please refer to match() on how to specify this parameter. $params array The parameters (name => value) to be parsed into the query. return $this The expression object itse

sphinx\MatchExpression addParams()

addParams() public method Adds additional parameters to be parsed into the query. See also params(). public $this addParams ( $params )$params array List of expression parameter values indexed by parameter placeholders. For example, [':name' => 'Dan', ':age' => 31]. return $this The expression object itself

sphinx\MatchExpression match()

match() public method Sets the MATCH expression. The method requires a $condition parameter, and optionally a $params parameter specifying the values to be parsed into the expression. The $condition parameter should be either a string (e.g. '@name "John"') or an array. See also: andMatch() orMatch() public $this match ( $condition, $params = [] )$condition string|array|yii\db\Expression The conditions that should be put in the MATCH expression. $params array The parameters (name =>

sphinx\MatchExpression $params

$params public property List of match expression parameter values indexed by parameter placeholders. For example, [':name' => 'Dan', ':age' => 31]. These parameters will be automatically escaped using yii\sphinx\Connection::escapeMatchValue() and inserted into MATCH expression as a quoted strings. public array $params = []

sphinx\MatchExpression $match

$match public property MATCH expression. For example: ['title' => 'Yii', 'content' => 'Sphinx']. Note: being specified as a plain string this value will not be quoted or escaped, do not pass possible unsecured values (like the ones obtained from HTTP request) as a direct value. See also match(). public string|array|yii\db\Expression $match = null

sphinx\MatchBuilder __construct()

__construct() public method Constructor. public void __construct ( $connection, $config = [] )$connection yii\sphinx\Connection The Sphinx connection. $config array Name-value pairs that will be used to initialize the object properties

sphinx\MatchBuilder parseParams()

parseParams() protected method Returns the actual MATCH expression by inserting parameter values into the corresponding placeholders. protected string parseParams ( $expression, $params )$expression string The expression string which is needed to prepare. $params array The binding parameters for inserting. return string Parsed expression.

sphinx\MatchBuilder buildSimpleMatch()

buildSimpleMatch() public method Creates an Match expressions like "column" operator value. public string buildSimpleMatch ( $operator, $operands, &$params )$operator string The operator to use. Anything could be used e.g. >, <=, etc. $operands array Contains two column names. $params array The expression parameters to be populated return string The MATCH expression throws yii\base\InvalidParamException on invalid operands count.

sphinx\MatchBuilder buildProximityMatch()

buildProximityMatch() public method Create PROXIMITY expressions public string buildProximityMatch ( $operator, $operands, &$params )$operator string The operator which is used for Create Match expressions $operands array The Match expressions $params return string The MATCH expression