public static final class ScoredDocument.Builder extends Document.BuilderA builder of scored documents. This is not thread-safe.
Methods
addExpression(Field expression)
public ScoredDocument.Builder addExpression(Field expression)Adds the expression to the builder.
| Parameter | |
|---|---|
| Name | Description |
expression |
Fieldthe expression field to add |
| Returns | |
|---|---|
| Type | Description |
ScoredDocument.Builder |
this builder |
addScore(double score)
public ScoredDocument.Builder addScore(double score)Adds the score to the builder.
| Parameter | |
|---|---|
| Name | Description |
score |
doublethe score to add |
| Returns | |
|---|---|
| Type | Description |
ScoredDocument.Builder |
this builder |
build()
public ScoredDocument build()Builds a valid document. The builder must have set a valid document id, and have a non-empty set of valid fields.
| Returns | |
|---|---|
| Type | Description |
ScoredDocument |
the scored document built by this builder |
setCursor(Cursor cursor)
public ScoredDocument.Builder setCursor(Cursor cursor)Sets the cursor to the next set of results from search.
| Parameter | |
|---|---|
| Name | Description |
cursor |
Cursorthe Cursor for the next set of results from search |
| Returns | |
|---|---|
| Type | Description |
ScoredDocument.Builder |
this builder |