Application Configuration Template Expressions

Template expressions are used to configure some Fusion pipeline stage and messaging services. When the value of a configuration parameter is a template expression, that expression is dynamically evaluated at runtime, by the StringTemplate library.

Fusion template expressions are delimited by angle bracket characters '<' and '>'. The expression consists of the name of a variable in the scope of that component. Since these variables are Java objects, if object "foo" of type Foo has a field named "bar", the expression "<>" will evaluate to the string representation of the contents of field "bar".

Index Pipeline Stage Templates

Index stages have available variables

  • "ctx" - Context (com.lucidworks.apollo.pipeline.Context)

  • "doc" - PipelineDocument (com.lucidworks.apollo.common.pipeline.PipelineDocument)

For example, given a PipelineDocument which has a field named "title" with value "Star Wars", the template expression "<doc.title>" evaluates to "Star Wars".

Query pipeline stage Templates

Query stages have available variables:

  • "ctx" - Context (com.lucidworks.apollo.pipeline.Context)

  • "reqResp" - QueryRequestAndResponse (com.lucidworks.apollo.pipeline.query.QueryRequestAndResponse)

  • "request" - Query Request (com.lucidworks.apollo.pipeline.query.Request)

  • "response" - Query Response (com.lucidworks.apollo.pipeline.query.Response)

Messaging Services Templates

Messages have a set of variables which correspond to the parts of a system message:

  • id

  • to

  • from

  • subject

  • body

  • type

  • schedule

A system message is the result of evaluating the following expression: