yii\sphinx\QueryBuilder::callKeywords PHP Метод

callKeywords() публичный Метод

Builds a SQL statement for returning tokenized and normalized forms of the keywords, and, optionally, keyword statistics.
public callKeywords ( string $index, string $text, boolean $fetchStatistic, array &$params ) : string
$index string the name of the index from which to take the text processing settings
$text string the text to break down to keywords.
$fetchStatistic boolean whether to return document and hit occurrence statistics
$params array the binding parameters that will be modified by this method so that they can be bound to the Sphinx command later.
Результат string the SQL statement for call keywords.
    public function callKeywords($index, $text, $fetchStatistic, &$params)
    {
        $indexParamName = self::PARAM_PREFIX . count($params);
        $params[$indexParamName] = $index;
        $textParamName = self::PARAM_PREFIX . count($params);
        $params[$textParamName] = $text;
        return 'CALL KEYWORDS(' . $textParamName . ', ' . $indexParamName . ($fetchStatistic ? ', 1' : '') . ')';
    }