The Google App Engine has previously released a Search API, that allows you to create Document
objects, which can be searched within an indexing system similar to Googles search operations.
One of the associated classes is the FieldExpression
. According to the documentation, an expression allows you to define custom content snippets for your fields. The example that they have given for a FieldExpression definition is:
FieldExpression(name='content_snippet',
expression='snippet("very important", content)')
...where the name
parameter identifies the expression, and the expression
parameter is some form of code, executed when the specific FieldExpression
's value is accessed on a document.
My question is, can I call external methods on my Document object (or possibly else where), from within the expression code? If not, what are your syntax options for use when defining a FieldExpression
object?