Package com.google.appengine.api.search
Class ScoredDocument.Builder
- java.lang.Object
-
- com.google.appengine.api.search.Document.Builder
-
- com.google.appengine.api.search.ScoredDocument.Builder
-
- Enclosing class:
- ScoredDocument
public static final class ScoredDocument.Builder extends Document.Builder
A builder of scored documents. This is not thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScoredDocument.BuilderaddExpression(Field expression)Adds the expression to the builder.ScoredDocument.BuilderaddScore(double score)Adds the score to the builder.ScoredDocumentbuild()Builds a valid document.ScoredDocument.BuildersetCursor(Cursor cursor)Sets the cursor to the next set of results from search.
-
-
-
Method Detail
-
setCursor
public ScoredDocument.Builder setCursor(Cursor cursor)
Sets the cursor to the next set of results from search.- Parameters:
cursor- theCursorfor the next set of results from search- Returns:
- this builder
-
addScore
public ScoredDocument.Builder addScore(double score)
Adds the score to the builder.- Parameters:
score- the score to add- Returns:
- this builder
-
addExpression
public ScoredDocument.Builder addExpression(Field expression)
Adds the expression to the builder.- Parameters:
expression- the expression field to add- Returns:
- this builder
- Throws:
IllegalArgumentException- if the expression field is invalid
-
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.- Overrides:
buildin classDocument.Builder- Returns:
- the scored document built by this builder
- Throws:
IllegalArgumentException- if the scored document built is not valid
-
-