google.appengine.api.search.SortOptions

Represents a multi-dimensional sort of Documents.

Inherits From: expected_type

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)

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.

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.

expressions A list of SortExpression specifying a multi-dimensional sort.
limit Returns the limit on the number of documents to score or sort.
match_scorer Returns a match scorer to score documents with.