FT.SUGADD key string score [INCR] [PAYLOAD payload]
@search,
@write,
Add a suggestion string to an auto-complete suggestion dictionary
keyis suggestion dictionary key.
stringis suggestion string to index.
scoreis floating point number of the suggestion string's weight.
The auto-complete suggestion dictionary is disconnected from the index definitions and leaves creating and updating suggestions dictionaries to the user.
INCRincrements the existing entry of the suggestion by the given score, instead of replacing the score. This is useful for updating the dictionary based on user queries in real time.
PAYLOAD {payload}saves an extra payload with the suggestion, that can be fetched by adding the WITHPAYLOADS argument to FT.SUGGET.
127.0.0.1:6379> FT.SUGADD sug "hello world" 1
(integer) 3| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ❌ Standard ❌ Active-Active |
❌ Standard ❌ Active-Active |
FT.SUGGET | FT.SUGDEL | FT.SUGLEN