yii\elasticsearch\Query::addSuggester PHP Method

addSuggester() public method

Adds a suggester to this query.
See also: http://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html
public addSuggester ( string $name, string | array $definition )
$name string the name of the suggester
$definition string | array the configuration options for this suggester. Can be an array or a json string.
    public function addSuggester($name, $definition)
    {
        $this->suggest[$name] = $definition;
        return $this;
    }