com.google.appengine.api.search
Class ScoredDocument.Builder

java.lang.Object
  extended by com.google.appengine.api.search.Document.Builder
      extended by 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
 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.
 
Methods inherited from class com.google.appengine.api.search.Document.Builder
addField, addField, setId, setLocale, setOrderId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setCursor

public ScoredDocument.Builder setCursor(Cursor cursor)
Sets the cursor to the next set of results from search.

Parameters:
cursor - the Cursor for the next set of results from search

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 class Document.Builder
Returns:
the scored document built by this builder
Throws:
java.lang.IllegalArgumentException - if the scored document built is not valid