K - Key type.V - Value type.public static class SearchReply.SearchResult<K,V> extends Object
| Constructor and Description |
|---|
SearchResult() |
SearchResult(K id)
Creates a new SearchResult with the specified document ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFields(K key,
V value)
Adds a single document field
|
void |
addFields(Map<K,V> fields)
Adds all the provided fields
|
Map<K,V> |
getFields()
Gets the document fields.
|
K |
getId()
Gets the document ID.
|
V |
getPayload()
Gets the document payload.
|
Double |
getScore()
Gets the document score.
|
V |
getSortKey()
Gets the sort key.
|
public SearchResult(K id)
id - the document IDpublic SearchResult()
public K getId()
public Double getScore()
This is only available if WITHSCORES was used in the search.
public V getPayload()
This is only available if WITHPAYLOADS was used in the search.
public V getSortKey()
This is only available if WITHSORTKEYS was used in the search.
public Map<K,V> getFields()
This contains the field names and values of the document. If NOCONTENT was used in the search, this will be null or empty.
public void addFields(Map<K,V> fields)
fields - the document fieldsCopyright © 2025 lettuce.io. All rights reserved.