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) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key)
return the property value inside a key
|
String |
getId() |
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,
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 Document(String id, double score)
public String getId()
public Double getScore()
public Object get(String key)
key - key of the propertypublic String getString(String key)
key - key of the propertypublic boolean hasProperty(String key)
public Document setScore(float score)
score - new score to setCopyright © 2024. All rights reserved.