google.appengine.api.search.FieldExpression

Represents an expression that will be computed for each result returned.

Inherits From: expected_type

For example, FieldExpression(name='content_snippet', expression='snippet("very important", content)') means a computed field 'content_snippet' will be returned with each search result, which contains HTML snippets of the 'content' field which match the query 'very important'.

name The name of the computed field for the expression.
expression The expression to evaluate and return in a field with given name in results. See https://developers.google.com/appengine/docs/python/search/overview#Expressions for a list of legal expressions.

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.
ExpressionError If the expression string is not parseable.

expression Returns a string containing an expression returned in search results.
name Returns name of the expression to return in search results.

MAXIMUM_EXPRESSION_LENGTH 1000
MAXIMUM_OPERATOR_LENGTH 100