src/Suggestion.php
public function get(string $prefix, bool $fuzzy = false, bool $withPayloads = false, int $max = -1): array
    {
        $args = [
            $this->indexName,
            $prefix,
        ];
        if ($fuzzy) {
            $args[] = 'FUZZY';
        }
        if ($withPayloads) {
            $args[] = 'WITHPAYLOADS';
        }
        if ($max >= 0) {
            $args[] = 'MAX';
            $args[] = $max;
        }
        return $this->redisClient->rawCommand('FT.SUGGET', $args);
    }
public function get(string $prefix, bool $fuzzy = false, bool $withPayloads = false, int $max = -1): array
    {
        $args = [
            $this->indexName,
            $prefix,
        ];
        if ($fuzzy) {
            $args[] = 'FUZZY';
        }
        if ($withPayloads) {
            $args[] = 'WITHPAYLOADS';
        }
        if ($max >= 0) {
            $args[] = 'MAX';
            $args[] = $max;
        }
        return $this->redisClient->rawCommand('FT.SUGGET', $args);
    }
public function get ( string $ prefix , bool $ fuzzy = false , bool $ withPayloads = false , int $ max = - 1 ) : array { $ args = [ $ this -> indexName , $ prefix , ] ; if ( $ fuzzy ) { $ args [ ] = 'FUZZY' ; } if ( $ withPayloads ) { $ args [ ] = 'WITHPAYLOADS' ; } if ( $ max >= 0 ) { $ args [ ] = 'MAX' ; $ args [ ] = $ max ; } return $ this -> redisClient -> rawCommand ( 'FT.SUGGET' , $ args ) ; }
Get completion suggestions for a prefix.

@param string $prefix
@param bool $fuzzy
@param bool $withPayloads
@param int $max
@return array
Get completion suggestions for a prefix .