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.SortOptions Class Reference
Inheritance diagram for google.appengine.api.search.search.SortOptions:

Public Member Functions

def __init__
 
def expressions
 
def match_scorer
 
def limit
 
def __repr__
 

Detailed Description

Represents a mulit-dimensional sort of Documents.

 The following code shows how to sort documents based on product rating
 in descending order and then cheapest product within similarly rated
 products, sorting at most 1000 documents:

   SortOptions(expressions=[
       SortExpression(expression='rating',
           direction=SortExpression.DESCENDING, default_value=0),
       SortExpression(expression='price + tax',
           direction=SortExpression.ASCENDING, default_value=999999.99)],
       limit=1000)

Constructor & Destructor Documentation

def google.appengine.api.search.search.SortOptions.__init__ (   self,
  expressions = None,
  match_scorer = None,
  limit = 1000 
)
Initializer.

Args:
  expressions: An iterable of SortExpression representing a
multi-dimensional sort of Documents.
  match_scorer: A match scorer specification which may be used to
score documents or in a SortExpression combined with other features.
  limit: The limit on the number of documents to score or sort.

Raises:
  TypeError: If any of the parameters has an invalid type, or an unknown
attribute is passed.
  ValueError: If any of the parameters has an invalid value.

Member Function Documentation

def google.appengine.api.search.search.SortOptions.expressions (   self)
A list of SortExpression specifying a multi-dimensional sort.
def google.appengine.api.search.search.SortOptions.limit (   self)
Returns the limit on the number of documents to score or sort.
def google.appengine.api.search.search.SortOptions.match_scorer (   self)
Returns a match scorer to score documents with.

The documentation for this class was generated from the following file: