K - Key type.V - Value type.public class SugGetArgs<K,V> extends Object
This class provides a builder pattern for constructing arguments for getting completion suggestions from an auto-complete dictionary. The FT.SUGGET command retrieves completion suggestions for a prefix from an auto-complete suggestion dictionary.
| Modifier and Type | Class and Description |
|---|---|
static class |
SugGetArgs.Builder
Builder entry points for
SugGetArgs. |
| Constructor and Description |
|---|
SugGetArgs() |
| Modifier and Type | Method and Description |
|---|---|
void |
build(CommandArgs<K,V> args)
Builds the arguments and appends them to the
CommandArgs. |
SugGetArgs<K,V> |
fuzzy()
Perform a fuzzy prefix search, including prefixes at Levenshtein distance of 1 from the prefix sent.
|
boolean |
isWithPayloads()
Check if WITHPAYLOADS option is enabled.
|
boolean |
isWithScores()
Check if WITHSCORES option is enabled.
|
SugGetArgs<K,V> |
max(long max)
Limit the results to a maximum of
max suggestions (default: 5). |
SugGetArgs<K,V> |
withPayloads()
Return optional payloads saved along with the suggestions.
|
SugGetArgs<K,V> |
withScores()
Also return the score of each suggestion.
|
public SugGetArgs<K,V> fuzzy()
this SugGetArgs.public SugGetArgs<K,V> withScores()
this SugGetArgs.public SugGetArgs<K,V> withPayloads()
this SugGetArgs.public SugGetArgs<K,V> max(long max)
max suggestions (default: 5).max - the maximum number of suggestions to return.this SugGetArgs.public boolean isWithScores()
true if WITHSCORES is enabledpublic boolean isWithPayloads()
true if WITHPAYLOADS is enabledpublic void build(CommandArgs<K,V> args)
CommandArgs.args - the command arguments to append to.Copyright © 2025 lettuce.io. All rights reserved.