Represents an expression that will be computed for each result returned.
Inherits From: expected_type
View aliases
Main aliases
`google.appengine.api.search.search.FieldExpression`
google.appengine.api.search.FieldExpression(
name, expression
)
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'.
Args |
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.
|
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.
|
ExpressionError
|
If the expression string is not parseable.
|
Attributes |
expression
|
Returns a string containing an expression returned in search results.
|
name
|
Returns name of the expression to return in search results.
|
Class Variables |
MAXIMUM_EXPRESSION_LENGTH
|
1000
|
MAXIMUM_OPERATOR_LENGTH
|
100
|