com.google.appengine.api.search
Class ScoredDocument
- java.lang.Object
-
- com.google.appengine.api.search.Document
-
- com.google.appengine.api.search.ScoredDocument
-
- All Implemented Interfaces:
- java.io.Serializable
public final class ScoredDocument extends Document implements java.io.Serializable
Represents a document which may have been scored, possibly some computed expression fields, and a cursor to continue the search from.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
ScoredDocument.Builder
A builder of scored documents.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description Cursor
getCursor()
ACursor
to be used continuing search after this search result.java.util.List<Field>
getExpressions()
The list of Field which are the result of any extra expressions requested.java.util.List<java.lang.Double>
getSortScores()
Deprecated.Use an explicitFieldExpression
in yourQueryOptions
instead.static ScoredDocument.Builder
newBuilder()
java.lang.String
toString()
-
Methods inherited from class com.google.appengine.api.search.Document
equals, getFacetCount, getFacetNames, getFacets, getFacets, getFieldCount, getFieldNames, getFields, getFields, getId, getLocale, getOnlyFacet, getOnlyField, getRank, hashCode
-
-
-
-
Method Detail
-
getSortScores
@Deprecated public java.util.List<java.lang.Double> getSortScores()
Deprecated. Use an explicitFieldExpression
in yourQueryOptions
instead.Deprecated method to retrieve sort scores.The right way to retrieve a score is to use
_score
in aFieldExpression
.- Returns:
- a list containing the score, if one was used.
-
getExpressions
public java.util.List<Field> getExpressions()
The list of Field which are the result of any extra expressions requested. For example, if a request contains fields to snippet orFieldExpressions
which are named snippet expressions, then the returned expression will be a Field with the name specified in the request and HTML value set to the snippet.- Returns:
- the list of Field which are the result of extra expressions requested.
-
getCursor
public Cursor getCursor()
ACursor
to be used continuing search after this search result. For this field to be populated, useQueryOptions.Builder.setCursor(Cursor)
, where the cursor is created byCursor.newBuilder().setPerResult(true).build()
. OtherwisegetCursor()
will return null.- Returns:
- a cursor used for issuing a subsequent search that will return elements beginning after this result. Can be null
-
newBuilder
public static ScoredDocument.Builder newBuilder()
-
-