public class Suggestion extends Object
A suggestion contains the suggestion string itself, and optionally a score and payload when the FT.SUGGET command is called with WITHSCORES and/or WITHPAYLOADS options.
| Constructor and Description |
|---|
Suggestion(String value)
Create a new suggestion with only the value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getPayload()
Deprecated.
since 7.8, there is no replacement. Suggestion payloads (
WITHPAYLOADS) are deprecated by Redis since
RediSearch 2.0.0. |
Double |
getScore()
Get the suggestion score.
|
String |
getValue()
Get the suggestion string.
|
int |
hashCode() |
boolean |
hasPayload()
Deprecated.
since 7.8, there is no replacement. Suggestion payloads (
WITHPAYLOADS) are deprecated by Redis since
RediSearch 2.0.0. |
boolean |
hasScore()
Check if this suggestion has a score.
|
String |
toString() |
public Suggestion(String value)
value - the suggestion stringpublic String getValue()
public Double getScore()
null if not available@Deprecated public String getPayload()
WITHPAYLOADS) are deprecated by Redis since
RediSearch 2.0.0.null if not availablepublic boolean hasScore()
true if the suggestion has a score@Deprecated public boolean hasPayload()
WITHPAYLOADS) are deprecated by Redis since
RediSearch 2.0.0.true if the suggestion has a payloadCopyright © 2026 lettuce.io. All rights reserved.