V - Value type.public class SuggestionParser<V> extends Object implements ComplexDataParser<List<Suggestion<V>>>
This parser converts the response from the Redis FT.SUGGET command into a list of Suggestion objects. The FT.SUGGET
command can return different formats depending on the options used:
| Constructor and Description |
|---|
SuggestionParser(boolean withScores,
boolean withPayloads)
Create a new suggestion parser.
|
| Modifier and Type | Method and Description |
|---|---|
List<Suggestion<V>> |
parse(ComplexData data)
Parse the output of the Redis FT.SUGGET command and convert it to a list of
Suggestion objects. |
public SuggestionParser(boolean withScores,
boolean withPayloads)
withScores - whether the response includes scoreswithPayloads - whether the response includes payloadspublic List<Suggestion<V>> parse(ComplexData data)
Suggestion objects.
The parsing logic depends on the options used with the FT.SUGGET command:
parse in interface ComplexDataParser<List<Suggestion<V>>>data - output of FT.SUGGET commandSuggestion objectsCopyright © 2025 lettuce.io. All rights reserved.