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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-26 UTC."],[[["`FieldExpression` represents a computed field that is evaluated for each search result, allowing for dynamic content within results."],["The `name` argument specifies the name of the computed field, while the `expression` argument determines the logic to evaluate and return."],["The expression is limited to a maximum length of 1000 characters, and operators within the expression are limited to a maximum length of 100 characters."],["Errors will be raised if parameters are invalid, if the expression is not parseable, or if any values have invalid types."],["The `FieldExpression` class includes methods to return the `name` and `expression` strings of the field."]]],[]]