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