ScoredDocument.Builder (Google App Engine API for Java)

com.google.appengine.api.search

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

Send feedback about...

App Engine standard environment for Java