src/Suggestion.php
public function add(string $string, float $score, bool $increment = false, $payload = null)
    {
        $args = [
            $this->indexName,
            $string,
            $score
        ];
        if ($increment) {
            $args[] = 'INC';
        }
        if (!is_null($payload)) {
            $args[] = 'PAYLOAD';
            $args[] = $payload;
        }
        return $this->redisClient->rawCommand('FT.SUGADD', $args);
    }
public function add(string $string, float $score, bool $increment = false, $payload = null)
    {
        $args = [
            $this->indexName,
            $string,
            $score
        ];
        if ($increment) {
            $args[] = 'INC';
        }
        if (!is_null($payload)) {
            $args[] = 'PAYLOAD';
            $args[] = $payload;
        }
        return $this->redisClient->rawCommand('FT.SUGADD', $args);
    }
public function add ( string $ string , float $ score , bool $ increment = false , $ payload = null ) { $ args = [ $ this -> indexName , $ string , $ score ] ; if ( $ increment ) { $ args [ ] = 'INC' ; } if ( ! is_null ( $ payload ) ) { $ args [ ] = 'PAYLOAD' ; $ args [ ] = $ payload ; } return $ this -> redisClient -> rawCommand ( 'FT.SUGADD' , $ args ) ; }
Add a suggestion string to an auto-complete suggestion dictionary.
This is disconnected from the index definitions,
and leaves creating and updating suggestion dictionaries to the user.

@param string $string
@param float $score
@param bool $increment
@param null $payload
@return int
Add a suggestion string to an auto - complete suggestion dictionary . This is disconnected from the index definitions and leaves creating and updating suggestion dictionaries to the user .