public class SugGetArgs 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<?,?> args)
Builds the arguments and appends them to the
CommandArgs. |
SugGetArgs |
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 |
max(long max)
Limit the results to a maximum of
max suggestions (default: 5). |
SugGetArgs |
withPayloads()
Deprecated.
since 7.8, there is no replacement. The
WITHPAYLOADS argument of FT.SUGGET is deprecated by
Redis since RediSearch 2.0.0. |
SugGetArgs |
withScores()
Also return the score of each suggestion.
|
public SugGetArgs fuzzy()
this SugGetArgs.public SugGetArgs withScores()
this SugGetArgs.@Deprecated public SugGetArgs withPayloads()
WITHPAYLOADS argument of FT.SUGGET is deprecated by
Redis since RediSearch 2.0.0.this SugGetArgs.public SugGetArgs 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<?,?> args)
CommandArgs.args - the command arguments to append to.Copyright © 2026 lettuce.io. All rights reserved.