App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | List of all members
google.appengine.api.search.search.ScoredDocument Class Reference
Inheritance diagram for google.appengine.api.search.search.ScoredDocument:
google.appengine.api.search.search.Document

Public Member Functions

def __init__
 
def sort_scores
 
def expressions
 
def cursor
 
def __repr__
 
- Public Member Functions inherited from google.appengine.api.search.search.Document
def __init__
 
def doc_id
 
def fields
 
def language
 
def rank
 
def field
 
def __getitem__
 
def __iter__
 
def __repr__
 
def __eq__
 
def __ne__
 
def __hash__
 
def __str__
 

Additional Inherited Members

- Public Attributes inherited from google.appengine.api.search.search.Document
 doc_id
 
 rank
 
 language
 
 fields
 

Detailed Description

Represents a scored document returned from a search.

Constructor & Destructor Documentation

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.

Member Function Documentation

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: