public final class ScoredDocument extends Document implements Serializable
Represents a document which may have been scored, possibly some computed expression fields, and a cursor to continue the search from.
Implements
SerializableStatic Methods
newBuilder()
public static ScoredDocument.Builder newBuilder()
Returns | |
---|---|
Type | Description |
ScoredDocument.Builder |
Methods
getCursor()
public Cursor getCursor()
A Cursor to be used continuing search after this search
result. For this field to be populated, use
QueryOptions.Builder#setCursor(Cursor), where the cursor is
created by Cursor.newBuilder().setPerResult(true).build()
.
Otherwise #getCursor will return null.
Returns | |
---|---|
Type | Description |
Cursor |
a cursor used for issuing a subsequent search that will return elements beginning after this result. Can be null |
getExpressions()
public List<Field> getExpressions()
The list of Field which are the result of any extra expressions requested. For example, if a request contains fields to snippet or FieldExpressions which are named snippet expressions, then the returned expression will be a Field with the name specified in the request and HTML value set to the snippet.
Returns | |
---|---|
Type | Description |
List<Field> |
the list of Field which are the result of extra expressions requested. |
getSortScores() (deprecated)
public List<Double> getSortScores()
Deprecated. Use an explicit FieldExpression in your QueryOptions instead.
Deprecated method to retrieve sort scores.
The right way to retrieve a score is to use _score
in a FieldExpression.
Returns | |
---|---|
Type | Description |
List<Double> |
a list containing the score, if one was used. |
toString()
public String toString()
Returns | |
---|---|
Type | Description |
String |