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 and Description ScoredDocument.Builder
addExpression(Field expression)
Adds the expression to the builder.ScoredDocument.Builder
addScore(double score)
Adds the score to the builder.ScoredDocument
build()
Builds a valid document.ScoredDocument.Builder
setCursor(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
- theCursor
for 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:
java.lang.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:
build
in classDocument.Builder
- Returns:
- the scored document built by this builder
- Throws:
java.lang.IllegalArgumentException
- if the scored document built is not valid
-
-