public class Document extends Object implements Serializable
Constructor and Description |
---|
Document(String id) |
Document(String id,
Double score) |
Document(String id,
Map<String,Object> fields) |
Document(String id,
Map<String,Object> fields,
double score) |
Document(String id,
Map<String,Object> fields,
double score,
byte[] payload) |
Modifier and Type | Method and Description |
---|---|
Object |
get(String key)
return the property value inside a key
|
String |
getId() |
byte[] |
getPayload() |
Iterable<Map.Entry<String,Object>> |
getProperties() |
double |
getScore() |
String |
getString(String key)
return the property value inside a key
|
boolean |
hasProperty(String key) |
static Document |
load(String id,
Double score,
byte[] payload,
List<byte[]> fields) |
static Document |
load(String id,
Double score,
byte[] payload,
List<byte[]> fields,
boolean decode) |
Document |
set(String key,
Object value) |
Document |
setScore(float score)
Set the document's score
|
String |
toString() |
public Document(String id)
public static Document load(String id, Double score, byte[] payload, List<byte[]> fields, boolean decode)
public Object get(String key)
key
- key of the propertypublic String getString(String key)
key
- key of the propertypublic double getScore()
public byte[] getPayload()
public Document setScore(float score)
score
- new score to setpublic String getId()
public boolean hasProperty(String key)
Copyright © 2020 RedisLabs. All rights reserved.