|
| doc_id |
|
| rank |
|
| language |
|
| fields |
|
Represents a scored document returned from a search.
def google.appengine.api.search.search.ScoredDocument.__init__ |
( |
|
self, |
|
|
|
doc_id = None , |
|
|
|
fields = None , |
|
|
|
language = 'en' , |
|
|
|
sort_scores = None , |
|
|
|
expressions = None , |
|
|
|
cursor = None , |
|
|
|
rank = None |
|
) |
| |
Initializer.
Args:
doc_id: The visible printable ASCII string identifying the document which
does not start with '!'. Whitespace is excluded from ids. If no id is
provided, the search service will provide one.
fields: An iterable of Field instances representing the content of the
document.
language: The code of the language used in the field values.
sort_scores: The list of scores assigned during sort evaluation. Each
sort dimension is included. Positive scores are used for ascending
sorts; negative scores for descending.
expressions: The list of computed fields which are the result of
expressions requested.
cursor: A cursor associated with the document.
rank: The rank of this document. A rank must be a non-negative integer
less than sys.maxint. If not specified, the number of seconds since
1st Jan 2011 is used. Documents are returned in descending order of
their rank.
Raises:
TypeError: If any of the parameters have invalid types, or an unknown
attribute is passed.
ValueError: If any of the parameters have invalid values.
def google.appengine.api.search.search.ScoredDocument.cursor |
( |
|
self | ) |
|
A cursor associated with a result, a continued search starting point.
To get this cursor to appear, set the Index.cursor_type to
Index.RESULT_CURSOR, otherwise this will be None.
Returns:
The result cursor.
def google.appengine.api.search.search.ScoredDocument.expressions |
( |
|
self | ) |
|
The list of computed fields the result of expression evaluation.
For example, if a request has
FieldExpression(name='snippet', 'snippet("good story", content)')
meaning to compute a snippet field containing HTML snippets extracted
from the matching of the query 'good story' on the field 'content'.
This means a field such as the following will be returned in expressions
for the search result:
HtmlField(name='snippet', value='that was a <b>good story</b> to finish')
Returns:
The computed fields.
def google.appengine.api.search.search.ScoredDocument.sort_scores |
( |
|
self | ) |
|
The list of scores assigned during sort evaluation.
Each sort dimension is included. Positive scores are used for ascending
sorts; negative scores for descending.
Returns:
The list of numeric sort scores.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/search/search.py