K - Key type.V - Value type.public class SugAddArgs<K,V> extends Object
This class provides a builder pattern for constructing arguments for adding suggestions to an auto-complete dictionary. The FT.SUGADD command adds a suggestion string to an auto-complete suggestion dictionary with a specified score.
| Modifier and Type | Class and Description |
|---|---|
static class |
SugAddArgs.Builder
Builder entry points for
SugAddArgs. |
| Constructor and Description |
|---|
SugAddArgs() |
| Modifier and Type | Method and Description |
|---|---|
void |
build(CommandArgs<K,V> args)
Builds the arguments and appends them to the
CommandArgs. |
SugAddArgs<K,V> |
incr()
Increment the existing entry of the suggestion by the given score, instead of replacing the score.
|
SugAddArgs<K,V> |
payload(V payload)
Save an extra payload with the suggestion, that can be fetched by adding the WITHPAYLOADS argument to FT.SUGGET.
|
public SugAddArgs<K,V> incr()
this SugAddArgs.public SugAddArgs<K,V> payload(V payload)
payload - the payload to save with the suggestion.this SugAddArgs.public void build(CommandArgs<K,V> args)
CommandArgs.args - the command arguments to append to.Copyright © 2025 lettuce.io. All rights reserved.